A list of solutions to commonly asked coding interview questions

- Implement Fizz/Buzz
- Write fibbonaci iteratively and recursively
- Print all prime numbers between 1-100
- Explain Dynamic Programming
- Write a function that prints out the binary form of an int
- Implement parseInt
- Implement squareroot function
- Implement an exponent function
- Write a multiply function that multiples 2 integers without using *
- Write a function that generates a random array of 7ints between 1-7
- Given a 2D array of 1s and 0s, count the number of "islands of 1s" (e.g. groups of connecting 1s)
- Find the next perfect square
- Growth of a population
- Find the sum of all integers between two numbers
- Find the sum of the two lowest integers

- Find the most frequent integer in an array
- Find the common elements of 2 int arrays
- Find the only element in an array that only occurs once.
- Implement binary search of a sorted array of integers
- Find the min/max integers in an array
- Bit Manipulation: Lonely Integer
- Rotate array of X elements to the left, X times
- Find the middle number of an array with two equal sides

- Find the first non-repeated character in a String
- Find the vowels in a word
- Reverse a String iteratively and recursively
- Determine if 2 Strings are anagrams
- Check if String is a palindrome
- Check if a String is composed of all unique characters
- Determine if a String is an int or a double
- Find the length of the shortest word in a String
- Print all permutations of a String
- Implement Facebook's 'like' function using strings
- Write number is expanded form

- Implement a BST with insert and delete functions
- Print a tree using BFS and DFS
- Write a function that determines if a tree is a BST
- Find the smallest element in a BST
- Find the 2nd largest number in a BST
- Given a binary tree which is a sum tree (child nodes add to parent), write an algorithm to determine whether the tree is a valid sum tree
- Find the distance between 2 nodes in a BST and a normal binary tree
- Print the coordinates of every node in a binary tree, where root is 0,0
- Print a tree by levels
- Given a binary tree which is a sum tree, write an algorithm to determine whether the tree is a valid sum tree
- Given a tree, verify that it contains a subtree.
- Find the max distance between 2 nodes in a BST.
- Construct a BST given the pre-order and in-order traversal Strings

- Implement a stack with push and pop functions
- Implement a queue with queue and dequeue functions
- Find the minimum element in a stack in O(1) time
- Write a function that sorts a stack (bonus: sort the stack in place without extra memory)
- Implement a binary min heap. Turn it into a binary max heap
- Implement a queue using 2 stacks

- Implement a linked list (with insert and delete functions)
- Find the Nth element in a linked list
- Remove the Nth element of a linked list
- Check if a linked list has cycles
- Given a circular linked list, find the node at the beginning of the loop. Example: A->B->C->D->E->C, C is the node that begins the loop
- Check whether a link list is a palindrome
- Reverse a linked list iteratively and recursively

- Implement bubble sort
- Implement selection sort
- Implement insertion sort
- Implement merge sort
- Implement quick sort