Thank you for your interest in contributing! This repository aims to be the most comprehensive collection of interview algorithm solutions for software engineers.
- Popular LeetCode problems (especially top 100 interview questions)
- Company-specific questions from FAANG and other tech companies
- Optimization improvements to existing solutions
- Alternative approaches for existing problems
- Better explanations of algorithm approaches
- More detailed complexity analysis
- Real interview experiences and tips
- Study guides and learning paths
- Additional test cases including edge cases
- Performance benchmarks
- Code review and refactoring suggestions
- Follow existing patterns in the codebase
- Use Kotlin for new algorithm implementations
- Include comprehensive JavaDoc comments
- Add time/space complexity analysis in comments
- Write meaningful test cases with edge cases
/**
* LeetCode #XXX: Problem Name
* Problem description here...
*
* Time Complexity: O(...)
* Space Complexity: O(...)
*/
private fun algorithmName(params): ReturnType {
// Implementation with clear comments
}- Problem reference (LeetCode number if applicable)
- Clear problem description
- Algorithm explanation in comments
- Time and space complexity analysis
- At least 3 test cases including edge cases
- Multiple approaches if significantly different
git clone https://github.com/your-username/interview.git
cd interviewgit checkout -b feature/add-leetcode-xxx-problem-name# Ensure Java 11+ and Maven are installed
mvn compile
mvn test- Create new test file:
TestYourAlgorithm.kt - Follow existing naming conventions
- Include problem in appropriate category
# Compile your code
mvn test-compile
# Run your specific test
mvn test -Dtest=TestYourAlgorithm
# Run all tests to ensure nothing breaks
mvn test- Add your algorithm to
ALGORITHMS.mdindex - Update
README.mdif adding new category - Update complexity analysis table if needed
- Use descriptive commit messages
- Reference any related issues
- Include test results in PR description
array- Array manipulation problemsstring- String processing algorithmsdynamic-programming- DP solutionstree- Binary tree and tree algorithmsgraph- Graph algorithmsbinary-search- Search algorithmsbacktracking- Constraint satisfactionmath- Mathematical algorithmslinked-list- Linked list operations
easy- Beginner-friendly problemsmedium- Intermediate complexityhard- Advanced algorithms
faang- Facebook, Amazon, Apple, Netflix, Googlemicrosoft- Microsoft-specific questionsuber- Uber interview questionsairbnb- Airbnb coding challenges
package com.guyko
import junit.framework.TestCase
class TestYourAlgorithm : TestCase() {
fun testAlgorithmName() {
// Test case 1: Normal case
assertEquals(expected1, algorithmName(input1))
// Test case 2: Edge case
assertEquals(expected2, algorithmName(input2))
// Test case 3: Corner case
assertEquals(expected3, algorithmName(input3))
}
/**
* LeetCode #XXX: Problem Name
*
* Problem Statement:
* [Detailed problem description]
*
* Example:
* Input: [example input]
* Output: [example output]
* Explanation: [why this output]
*
* Constraints:
* - [constraint 1]
* - [constraint 2]
*
* Approach:
* [Explain the algorithm approach]
*
* Time Complexity: O(n) - [explanation]
* Space Complexity: O(1) - [explanation]
*/
private fun algorithmName(input: InputType): ReturnType {
// Clear, readable implementation
// with helpful comments explaining key steps
return result
}
}Contributors will be:
- Listed in README acknowledgments
- Tagged in releases when their solutions are included
- Featured in documentation for significant contributions
- Maintainer access for regular contributors
- Direct collaboration on repository direction
- Interview prep resources and study materials
- Open an issue with the
questionlabel - Join discussions in existing issues
- Review existing code for patterns and examples
- Automated checks run on all PRs
- Code review by maintainers
- Test verification ensures quality
- Documentation check for completeness
- Popular interview questions (asked by multiple companies)
- Multiple solution approaches for the same problem
- Optimization improvements to existing code
- Comprehensive test coverage
- Clean, readable code with good variable names
- Thorough comments explaining the approach
- Edge case handling and input validation
- Performance considerations noted
Our mission is to create:
- The most comprehensive algorithm interview repository
- Production-quality code that engineers actually use
- Excellent documentation for learning and reference
- Active community of contributors and learners
- GitHub stars and community engagement
- Real interview success stories from users
- Code quality and comprehensive coverage
- Educational value for computer science students
Every contribution, no matter how small, helps make this repository more valuable for software engineers preparing for technical interviews. Your effort helps others land their dream jobs!
Happy coding! 🚀