frncsrss / interviews

Code related to technical interview questions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code related to technical interview questions


Each package corresponds to the underlying data structure or problem of a technical interview question.

Disclaimer


All the code is my answer to the question and it should not be taken as granted. Technical interviews are about discussion and refinements of a first brute force yet well-implemented solution. There may be some better way to implement the solution(s).

Highlights


  • Range Minimum Query (using a sparse table)
  • Left-leaning Red-Black Tree
  • Max, Power, Sum
  • Union-Find (with path compression)
  • Shellsort
  • Pattern matching (Knuth-Morris-Pratt algorithm)

Misc


Take a look at the tests to get a better idea on how to use the methods. I tried to comment whenever there were some tricks involved.

About

Code related to technical interview questions


Languages

Language:Java 100.0%