• Home
  • Subscribe to Feed
  • Follow me
  • Twitter
  • Github

Let's Talk Algorithms

Complex Algorithms Simplified

Find Two Numbers in an Array Which Sum Up to K

Problem Statement Given an array of integers, find out two indices such that the sum of the numbers at that indices matches K. For example, {4, 6, 8, 1, 9} and K = 15, the output…

  • 3 years ago
  • Array, Frequently Asked Questions, Leetcode Easy, Interview Questions
  • Comments

Check If a Sudoku is Valid

Problem Statement Determine if a sudoku is Valid. Solution Explanation Given a sudoku grid, we need to verify if the already filled in numbers doesn't violate the sudoku rules. The rules are very simple, Each…

  • 3 years ago
  • Array, Leetcode Medium, Interview Questions
  • Comments

Generate all Factor Combinations

Problem Statement Given a number 'n', generate all factor combinations. For example, when n=24, the result would be [[2, 3, 3], [2, 9], [3, 6]] Solution Explanation As we know, every integer can be…

  • 3 years ago
  • Math, Leetcode Medium, Interview Questions
  • Comments

Check if a LinkedList has a cycle

Problem Statement Given a single linked list, verify if the list has a cycle. A linked list has a cycle if a node's reference points back to an earlier node in the chain. Example: 1…

  • 3 years ago
  • Linked List, Leetcode Easy, Interview Questions, Frequently Asked Questions
  • Comments

Best Time to Buy and Sell Stock

Problem Statement Given an array 'stocks' in which each value at index 'i' is the stock price on day 'i', Find the maximum profit you can make by performing atmost one Buy and one Sell…

  • 3 years ago
  • Array, Leetcode Easy, Interview Questions
  • Comments
 Newer Page 4 of 8 Older 

© 2021. All Rights Reserved.

Ghostium Theme by @oswaldoacauan

Proudly published with Ghost