Data Structures and Algorithms of Life

I knew software engineering would leave me nuts in the end. This is how I have started thinking now: ( dATA sTRUctuRES AND aLGOrITHMs OF LIFE)


If i can remove the if() of my life then I can also remove the else() part and it will be just a simple statement. But then it wont handle any conditions and the complexity will be O(n) to search a single happy moment, so its better to do a binary search of happy moments and make it O(logn).



Now I reduce the search time to O(1), using hash map just type in the detail of your happy moment and its there in a constant time 🙂



~ An Empty Glass


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: