Monday, July 30, 2018

How do I use Algorithms in real life?

In this post you will know how do we use algorithms and data structures in real life. they are
We do it all the time!



  • On the way to your college canteen? A* search
  • Waiting in line in the canteen? Queue
  • Notice that girl standing in front? Linear search
  • Searching for her dad in the phone book? Binary search
  • Stupid! Google it! Trie
  • Search for her on Facebook! Depth-first search
  • Found her! Friend request? Accepted! Send a Hi! Graph
  • Writing her a secret love letter? Caesar cipher
  • Uploading your first date pic on fb? Image compression algorithms
  • Looking through her Whatsapp messages? KMP algorithm
  • She found out and had your first fight? Start over with some gifts! Backtracking
  • Got her list of items to buy? Array
  • Too many items! Low on cash, maybe? Priority queue
  • Making her play treasure hunt for her gifts? Linked list
  • Wait! Go back! Is that a ring? Stack
  • Girl’s family not agreeing to your proposal? Divide and conquer
  • Got married? Congrats! Going for your honeymoon? Travelling salesman problem
  • Your mom packing luggage for you? 0/1 Knapsack problem
  • She packed your favorite pickles? Hash table
  • Driving to the airport? Breadth-first search

No comments:

Post a Comment

High Paying Jobs after Learning Python

Everyone knows Python is one of the most demand Programming Language. It is a computer programming language to build web applications and sc...