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…
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…
Problem Statement Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You…
Problem Statement Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of…
Problem Statement Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), find the minimum number of conference rooms required. For example, Given [[0, 30]…
Problem Statement Given two sparse matrices A and B, return the result of AB. You may assume that A's column number is equal to B's row number. Solution Explanation A sparse matrix is a matrix…