Problem: Given an array of heights, find out the max area that can be formed between any two bars. Solution: The…

Given an array of strings, group anagrams together. For example, given:[“eat”, “tea”, “tan”, “ate”, “nat”, “bat”] Return:

1 2 3 4 5 |
[ ["ate", "eat","tea"], ["nat","tan"], ["bat"] ] |

Note: All inputs…

Stack is an abstract data type. The basic operation of the stack can be: Push : Push object on top of stack. Throws an…

One of the simplest (in terms of understanding :P) sorting technique is Insertion Sort. You will find many sites giving…

1.Reverse string using loop Reverse string using iterator Check whether string is palindrome or not Below is my project explorer…

Suppose your dataSet is Cats, given in the MASS library. If you want to load then type following commands in R console…

Basic traversal on tree is best explained on http://en.wikipedia.org/wiki/Tree_traversal . In Order: Pre Order: Post Order: If anything is missing in explanation, you…

So here is another sorting algorithm, “Quick Sort” which I have implemented it using ArrayList which is inplace sorting algorithm. Worst case…

One more simple form of sorting algorithm is Selection Sort. For in-place implementation in java, starting from 1st index, find the smallest…

So here is another sorting algorithm, “Merge Sort” which I have implemented it using ArrayList. MergeSort follows the Divide and Conquer paradigm. Divide part…