Skip to content

Quick reference Java solutions for popular Google interview coding questions, designed to sharpen problem-solving skills and coding efficiency.

Notifications You must be signed in to change notification settings

Abhinavsathyann/Java-interview-questions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 

Repository files navigation

Google Java Interview Questions

A curated collection of Java coding problems frequently asked in Google technical interviews. This repository contains clean, well-explained solutions to classic algorithm and data structure challenges, aimed at helping software engineers prepare thoroughly for coding interviews.


Project Structure

google-java-interview-questions/

├── src/

│ ├── ReverseLinkedList.java

│ ├── ArrayRotation.java

│ ├── FindTwoMissingNumbers.java

│ ├── DetectCycleInLinkedList.java

│ ├── SnakeAndLadder.java

│ ├── MergeSortedLinkedLists.java

│ ├── PermutationsOfString.java

│ ├── SwapNumbers.java

│ ├── PairWithSum.java

│ ├── Fibonacci.java

│ ├── LRUCache.java

│ ├── ThirdFromEndLinkedList.java

│ ├── LinkedListIntersection.java

│ ├── MoveZerosToLeft.java

│ ├── MergeIntervals.java

│ ├── HighLowIndex.java

│ ├── AddBinaryStrings.java

│ ├── ValidMountainArray.java

│ ├── PowerSet.java

│ └── CloneGraph.java │

└── README.md


About The Project

This repository serves as a comprehensive guide to tackling Google’s top Java coding interview questions. Each source file includes a standalone Java class that implements a popular interview problem, demonstrating best practices in problem-solving, algorithm design, and clean coding.


Technologies Used

  • Java SE (Standard Edition)
  • Core Java concepts including Collections, Recursion, Dynamic Programming, LinkedLists, Arrays, and Graphs
  • No external dependencies, all problems use standard Java library

Getting Started

Prerequisites

  • Java Development Kit (JDK) 8 or higher
  • An IDE or text editor such as IntelliJ IDEA, Eclipse, or VS Code configured for Java development

How to Run

  1. Clone the repository to your local machine:

https://github.com/abhinavsathyann/google-java-interview-questions.git

  1. Navigate to the src directory:

cd google-java-interview-questions/src

  1. Compile and run any Java file. For example:

javac ReverseLinkedList.java

java ReverseLinkedList


List of Problems Included

  • Reverse Linked List
  • Array Rotation by K steps
  • Find Two Missing Numbers
  • Detect Cycle in Linked List
  • Snake and Ladder Game Design (OOP)
  • Merge Two Sorted Linked Lists
  • Print Permutations of a String
  • Swap Two Numbers Without Temp Variable
  • Find Pairs with Given Sum
  • Fibonacci Number (Recursive & DP)
  • LRU Cache Implementation
  • Find Third Element from End in Linked List
  • Linked List Intersection Point
  • Move Zeros to Left in Array
  • Merge Overlapping Intervals
  • Find First and Last Index of Element in Sorted Array
  • Add Binary Strings
  • Validate a Mountain Array
  • Generate Power Set of Array
  • Clone a Directed Graph

Contribution

Contributions are welcome! If you want to add more problems or improve existing ones:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/your-feature)
  3. Commit your changes (git commit -am 'Add new problem solution')
  4. Push to the branch (git push origin feature/your-feature)
  5. Create a Pull Request

Contact

For questions or suggestions:


License

This project is licensed under the MIT License

About

Quick reference Java solutions for popular Google interview coding questions, designed to sharpen problem-solving skills and coding efficiency.

Topics

Resources

Stars

Watchers

Forks

Languages