Difficulty: Medium, Asked-in: Facebook, Microsoft, Amazon, Morgan Stanley, Walmart, Flipkart, Hike, Oracle, Samsung, Snapdeal, Zoho

Key takeaway

  • This is one of the best interview problems to learn step-by-step optimization using several problem-solving approaches.
  • Kadane's algorithm idea is intuitive, using a single loop and a few variables to solve the problem…

Difficulty: Medium, Asked-in: Microsoft, Google, Amazon, Yahoo, Samsung

Key takeaways

  • A famous interview problem to learn problem-solving using various approaches and step-by-step time and space complexity optimization.
  • The Boyer-Moore Voting algorithm is worth exploring, which uses fascinating insight from the problem to get the solution in place using a single…

Shubham Gautam

Founder and CEO www.enjoyalgorithms.com | Super 30 | Founder www.enjoymathematics.com | IIT BHU | Empowering Youth for Success

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store