Algos in real life


In real life? We do it all the time!
  1. On the way to your college canteen? A* search
  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! Google it! 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. Looking through her Whatsapp messages? KMP algorithm
  11. She found out and had your first fight? Start over with some gifts! Backtracking
  12. Got her list of items to buy? Array
  13. Too many items! Low on cash, maybe? Priority queue
  14. Making her play treasure hunt for her gifts? Linked list
  15. Wait! Go back! Is that a ring? Stack
  16. Girl’s family not agreeing to your proposal? Divide and conquer
  17. Got married? Congrats! Going for your honeymoon? Travelling salesman problem
  18. Your mom packing luggage for you? 0/1 Knapsack problem
  19. She packed your favorite pickles? Hash table
  20. Driving to the airport? Breadth-first search