Cracking The Google Interview

This repository contains the solutions for algorithmic puzzles, interview questions, datastructure implementations and materials for basic cs concepts for top tech companies like Google, Amazon, Twitter, Facebook, Apple, Yelp, Uber etc.


How do I see interview questions?

Interview questions for the top tech companies like Facebook, Google, Amazon, Twitter, Apple, Uber, Yelp, Nvidia are available in folder. Files are named as is one file named which has interview questions from different companies mixed. Company name is mentioned next to the questions in square bracket [].

How do I see answers for the interview questions?

Answers for the questions are available in folder. Every question will have the java class name mentioned next to question in square bracket [] if it has an answer.

How do I learn about CS concepts to prepare for top tech interviews?

Materials for computer science concepts like operating system[Semaphores, mutual exclusion, critical section etc.], networks[dhcp, dns, nat, tcp, udp, website flow etc.], bigdata[elastic search, memcache, search etc.], machine architecture[CPU, GPU, X86 etc.] are available in

Where can I refer datastructure implementations?

Datastructure implemantations like Hashtable, Linkedlist[Singly, Doubly, Circular], Graph, Tree,Cache[LRU, MRU] etc. in

Where do I learn about programming language related topics/issues?

Programming language related topics like java-[abstract classes, jvm, memory etc.], c-[compilation, macros, malloc, pointers, segmentation fault, stack/heap memory etc.] , comparison between C and Java are available in

Where can I find common mistakes we do in interviews in programming challenges?

Common mistakes like Division by zero, array out of bound exceptions, recursive base cases are available in

How do I learn about multi-threading?

Multi threading concepts like multicore, hyperthreading etc. are available in And problems related to threading like DiningPhilosophers, ProducerConsumer are available in And the c implementations are in


This library has the solutions in Java.


ctgi is licensed under MIT License. See LICENSE for full license text.


Contributions are most welcome. You can make pull requests after your commit.

Project Contributor