Rachit GuptaLeetcode: Square Root (Sqrt)Square root of n will lie in the range [1, n]. So we need to search for x in a sorted array such that x*x equals given number. As you can…Dec 28, 2016Dec 28, 2016
Rachit GuptaLeetcode: Remove Duplicates from Sorted ListIterate through the list and delete next node if its value matches the current nodeDec 28, 2016Dec 28, 2016
Rachit GuptaLeetcode: Minimum Path SumThis one can be easily visualized as a dynamic programming problem as the path ending at grid point can either come from the point above it…Dec 28, 20162Dec 28, 20162
Rachit GuptaLeetcode: Unique PathsThis is just like the finonacci series calculation using dynamic programming. Fibonacci series is in one dimension here we have a two…Dec 28, 2016Dec 28, 2016
Rachit GuptaLeetcode: Length of last wordOnly trick here is to select the most efficient way of finding the last wordDec 28, 2016Dec 28, 2016
Rachit GuptaHackerrank : The Maximum SubarrayGiven an array of integers, findDec 28, 20161Dec 28, 20161
Rachit GuptaLeetcode: Palindrome Linked ListThere are multiple ways to solve this,Dec 28, 2016Dec 28, 2016
Rachit GuptaLeetcode: Guess number higher or lower doneThis is a simple application of binary search. We are given the upper bound as input and lower bound is 1. Think of it as a sorted list…Dec 27, 2016Dec 27, 2016
Rachit GuptaLeetcode: Ugly NumberThe problem is to list numbers divisible by 2, 3 and 5 in order. Brute force approach is to just check each number for divisibility by 2, 3…Dec 27, 2016Dec 27, 2016