Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

141 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coding Interview Practice Repository

A comprehensive collection of coding interview problems and solutions in Kotlin, organized by algorithm types and data structures. This repository contains solutions to problems from Codility, LeetCode, and common technical interview questions.

Repository Structure

coding_interview/
├── kotlin/               - Kotlin implementations (primary)
│   ├── src/main/kotlin/algorithms/  - All algorithm implementations
│   ├── build.gradle.kts - Gradle build configuration
│   └── README.md        - Kotlin-specific guide
│
├── python/              - Python implementations
│   ├── algorithms/      - Core algorithm implementations
│   ├── striver/         - Striver series problems
│   └── codility/        - Codility practice problems
│
└── docs/
    └── kotlin/docs/     - Comprehensive Kotlin documentation

This repository contains implementations in two languages:

  • kotlin/ - Kotlin implementations (primary, with comprehensive documentation)
  • python/ - Python implementations

kotlin/ - Kotlin Implementations

The primary Kotlin codebase with comprehensive documentation and organized structure.

Code Organization

kotlin/src/main/kotlin/algorithms/
├── arrays/            - Array manipulation, rotation, searching, subarrays
├── strings/           - String problems (anagrams, palindromes, pattern matching)
├── dynamic_programming/ - DP solutions (fibonacci, knapsack, coin change, subsequence)
├── prefix_sum/        - Prefix sum technique problems
├── sliding_window/    - Sliding window pattern (caterpillar method)
├── stack_queue/       - Stack and queue implementations
├── sorting/           - Sorting algorithms and problems
├── greedy/            - Greedy algorithm solutions
├── math/              - Mathematical problems (primes, factorials, GCD)
├── bit_manipulation/  - Bitwise operations
├── recursion/         - Recursive solutions
├── patterns/          - Pattern printing problems
└── basics/            - Kotlin basics (iteration, collections)

Documentation

docs/kotlin/docs/
├── kotlin-basics/     - Kotlin fundamentals (arrays, strings, maps, numbers)
├── algorithm-theory/  - Complexity analysis, DP patterns, sorting algorithms
├── data-structures/   - Trees, linked lists, graphs
├── interview-prep/    - Problem patterns, tips, study plan, problem types
├── techniques/        - HashMap, sliding window, prefix sum
└── README.md          - Complete documentation guide

Start here: Read docs/kotlin/docs/README.md for a complete guide to all documentation and study plans.

python/ - Python Implementations

Python implementations organized by source:

  • algorithms/ - Core algorithm implementations (arrays, DP, strings, sorting, etc.)
  • striver/ - Striver series problem solutions
  • codility/ - Codility practice problems

Quick Start

For Interview Preparation

  1. Navigate to docs/kotlin/docs/README.md for the complete documentation index
  2. Review docs/kotlin/docs/interview-prep/problem-types-index.md to identify problem patterns
  3. Study specific topics in docs/kotlin/docs/algorithm-theory/ and docs/kotlin/docs/data-structures/
  4. Practice with code in kotlin/src/main/kotlin/algorithms/

Study Path

  1. Week 1-2: Kotlin basics, arrays, strings, two pointers
  2. Week 3-4: Dynamic programming patterns (all DP types A-G)
  3. Week 5-6: Trees, graphs, advanced data structures
  4. Week 7+: Mock interviews, company-specific problems

By Problem Type

  • Arrays: docs/kotlin/docs/interview-prep/array-problems.md
  • Dynamic Programming: docs/kotlin/docs/algorithm-theory/dp_patterns.md
  • Trees: docs/kotlin/docs/data-structures/tree_interview_questions.md
  • Patterns: docs/kotlin/docs/interview-prep/interview_patterns.md

Running Code

Each Kotlin file contains:

  • Problem description with examples
  • Time and space complexity analysis
  • Multiple test cases
  • Clear implementation with comments

To run any file:

kotlinc filename.kt -include-runtime -d filename.jar && java -jar filename.jar

Or use the test scripts in kotlin/outputs/ for batch testing.

Practice Platforms

Coding Challenge Sites

Algorithm Visualization

Study Resources

Video Tutorials

Books and Reading

  • Cracking the Coding Interview by Gayle Laakmann McDowell
  • Elements of Programming Interviews by Adnan Aziz
  • Algorithm Design Manual by Steven Skiena

Features

  • 90+ algorithm implementations in Kotlin
  • Comprehensive documentation covering all major topics
  • Problem pattern recognition guides
  • Multiple implementations for comparison (6 rotation algorithms, 6 fibonacci variations)
  • Interview preparation strategies and tips
  • Organized by technique, data structure, and problem type

Documentation Highlights

  • Complete DP Guide: All 9 DP patterns (Fibonacci, 0/1 Knapsack, Unbounded Knapsack, LCS, LIS, Palindrome, MCM, Grids, State Machine)
  • Problem Patterns: 15 common interview patterns with recognition tips
  • Complexity Reference: Big O cheatsheet for all algorithms
  • Interview Tips: Communication strategies, common gotchas, time management

See docs/kotlin/docs/README.md for complete details.

About

Coding Interview Questions - Codility, Coding, Dynamic Programming, Recursion, Coding Optimization, Coding Complexity

Topics

Resources

Stars

3 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages