Skip to content

bwelch21/technical-interview

Repository files navigation

technical-interview

Information and practice for technical interviews

Data Structures/Concepts and Corresponding Algorithms

Taken primarily from http://www.geeksforgeeks.org/top-10-algorithms-in-interview-questions/
Number Theory and Bit Manipulation topics not included since I've never come across these in a technical interview

  1. Graphs
    • Breadth First Search
    • Depth First Search
    • Shortest Path from source to all vertices (Dijkstra's)
    • Shortest Path from every vertex to every other vertex (Floyd's)
    • Detect a cycle in a Graph
    • Minimum Spanning Tree (Prim's as well as Kruskal's)
    • Topological Sort
    • Find all possible words in a board of characters
    • Bridges in a Graph
  2. Linked Lists
    • Insertion of a node given certain constraints
    • Deletion of a node given some constraints
    • Compare two strings represented as Linked Lists
    • Add two numbers represented by Linked Lists
    • Merge a Linked List into another Linked List at alternate positions
    • Reverse a Linked List in groups of a given size
    • Union and intersection of two Linked Lists
    • Detect and remove a loop in a Linked List
    • Merge sort for Linked Lists
    • Select a random node from a singly-Linked List
  3. Dynamic Programming
    • Longest Common Subsequence
    • Longest Increasing Subsequence
    • Edit distance
    • Minimum partition
    • Ways to cover a distance
    • Longest path in matrix
    • Subset sum problem
    • Optimal strategy for a game
    • 0-1 Knapsack problem
    • Boolean parenthisization problem
  4. Sorting and Searching
    • Binary search
    • Search an element in a sorted and rotated array
    • Bubble sort
    • Insertion sort
    • Merge sort
    • Heap sort (binary heap)
    • Quick sort
    • Interpolation sort
    • Find k-th smallest/largest element in an unsorted array
    • Given a sorted array and a number x, find the pair whose sum is closest to x (2 sum variant)
  5. Binary Tree and Binary Search Tree
    • Find minimum depth of Binary Tree
    • Maximum path sum in a Binary Tree
    • Check if a given array represents the preorder traversal of a Binary Tree
    • Check whether Binary Tree is full or not
    • Bottom view of a Binary Tree
    • Print nodes in top view of a Binary Tree
    • Remove nodes on root to leaf paths of length < k
    • Lowest Common Ancestor in a Binary Search Tree
    • Check if a tree is a subset of another
    • Reverse alternate levels of a perfect Binary Tree
  6. String/Array
    • Reverse an array without affecting special characrters
    • All possible palindromic partitions
    • Count triplets with sum smaller than a given value
    • Convert array into zig-zag fashion
    • Generate all possible sorted arrays from alternate methods of two given sorted arrays
    • Pythagorean triple in an array
    • Length of the largest subarray with contiguous elements
    • Find the smallest positive integer value that cannot be represented as the sum of any subset of a given array
    • smallest subarray with sum greater than a given value
    • Stock buy-or-sell to maximize profit

Links and resources

https://www.toptal.com/algorithms/interview-questions

About

Information and practice for technical interviews

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published