How do I use algorithms and data structure in real life?

How do I use algorithms and data structure in real life? by @robinthomas91

Answer by Robin Thomas:

Real life? We do it all the time!

  1. On the way to your college canteen? Dijkstra's algorithm
  2. Waiting in line in the canteen? Queue
  3. Notice that girl standing in front? Linear search
  4. Searching for her dad in the phone book? Binary search
  5. Stupid! Maybe a Google search in her name? Trie
  6. Search for her on Facebook! Depth-first search
  7. Found her! Friend request? Accepted! Send a Hi! Graph
  8. Writing her a secret love letter? Caesar cipher
  9. Uploading your first date pic on fb? Image compression algorithms
  10. Teaching her driving? Hey, you missed the exit! Go back! Stack
  11. Valentine’s day? Got her list of items to buy? Array
  12. Too many items! Low on cash, maybe? Priority queue
  13. Making her play treasure hunt for her gifts? Linked list
  14. Looking through her Whatsapp messages? KMP algorithm
  15. Got married? Congrats! Going for your honeymoon? Travelling salesman problem
  16. Your mom packing luggage for you? 0/1 Knapsack problem
  17. She packed your favorite pickles? Hash table
  18. Driving to the airport? Breadth-first search

How do I use algorithms and data structure in real life?

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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