Stack Implementation using Single LinkedList Java
Stack is one of the most used data structures in computer science. It is a linear data structure which supports ordering of elements in Last In First Out order(LIFO). The very typical real world…
Stack is one of the most used data structures in computer science. It is a linear data structure which supports ordering of elements in Last In First Out order(LIFO). The very typical real world…
Problem Statement Given an a list of n integers which are non negative and represent an elevation map of various buildings where the width of each bar/building is 1, Find out how much water…
Problem Statement Given two integer arrays, arr1 and arr2, find K pairs of elements such that (x,y) where x is the value from the first array and y is the value from the second…
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…
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…