Skip to content

My LeetCode solutions in Java, Go, JavaScript/TypeScript, and Python. Focus on Data Structures and Algorithms (DSA), optimization, and fluency in multiple languages for technical interviews. Organized by algorithmic patterns.

License

Notifications You must be signed in to change notification settings

pjardan/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Solutions

This repository contains my solutions to LeetCode problems, organized by programming language and algorithmic patterns. The goals are to strengthen Data Structures & Algorithms (DSA), write clean and efficient code, and maintain fluency across multiple languages for technical interviews.

Repository Structure

.
├── java/
│   ├── src/
│   │   └── main/
│   │       └── com/
│   │           └── pedrojardim/
│   │               └── leetcode/
│   │                   ├── arrays/
│   │                   ├── binarysearch/
│   │                   ├── strings/
│   │                   ├── hashmap_set/
│   │                   ├── stacks_queues/
│   │                   ├── linkedlists/
│   │                   ├── trees/
│   │                   ├── graphs/
│   │                   ├── heaps/
│   │                   ├── intervals/
│   │                   ├── backtracking/
│   │                   └── dynamic_programming/
│   └── README.md
├── go/
│   ├── arrays/
│   ├── binarysearch/
│   ├── strings/
│   ├── hashmap_set/
│   ├── stacks_queues/
│   ├── linkedlists/
│   ├── trees/
│   ├── graphs/
│   ├── heaps/
│   ├── intervals/
│   ├── backtracking/
│   └── dynamic_programming/
│   └── README.md
├── javascript/
│   ├── arrays/
│   ├── binarysearch/
│   ├── strings/
│   ├── hashmap_set/
│   ├── stacks_queues/
│   ├── linkedlists/
│   ├── trees/
│   ├── graphs/
│   ├── heaps/
│   ├── intervals/
│   ├── backtracking/
│   └── dynamic_programming/
│   └── README.md
├── python/
│   ├── arrays/
│   ├── binarysearch/
│   ├── strings/
│   ├── hashmap_set/
│   ├── stacks_queues/
│   ├── linkedlists/
│   ├── trees/
│   ├── graphs/
│   ├── heaps/
│   ├── intervals/
│   ├── backtracking/
│   └── dynamic_programming/
│   └── README.md
└── README.md

Within each language folder, problems are grouped by algorithmic pattern (e.g., arrays, graphs, dynamic_programming). Each solution typically includes:

  • The solution code
  • Brief explanation and approach notes
  • Time/space complexity (Big-O)
  • Link to the original LeetCode problem

Languages

  • Java (primary): Streams, lambdas, Optional, modern Java (11–21), clean OOP
  • TypeScript/JavaScript: ES6+, clarity and performance
  • Go: Concurrency (goroutines/channels), idiomatic error handling
  • Python: Concise and “pythonic” solutions

Algorithmic Patterns Covered

  • Arrays & Strings (Two Pointers, Sliding Window, Prefix Sum)
  • Hash Maps & Sets
  • Stacks & Queues (including Monotonic Stack)
  • Binary Search (and variations)
  • Linked Lists
  • Trees (DFS, BFS, BST)
  • Graphs (DFS, BFS, topological sort, shortest path)
  • Heaps & Priority Queues
  • Intervals
  • Backtracking
  • Dynamic Programming (memoization, tabulation)

How to Navigate

  • Browse by language and then by pattern
  • File names mirror problem names when possible (e.g., TwoSum.java, longest_substring_without_repeating_characters.go)
  • Each language directory may contain its own README with details and tips

Local Running

Examples (Java):

# Navigate to the Java solution folder
cd java/src/main/com/pedrojardim/leetcode/arrays
javac TwoSum.java
java TwoSum

If tests are configured:

mvn test
# or
gradle test

Study Approach

  • Consistent practice (NeetCode 150, blind 75, patterns-first)
  • Refactor to idiomatic solutions after passing
  • Add notes on trade-offs and alternative approaches

Useful Links

Contact

License

This repository is for personal study. Feel free to read and learn from it. If you find issues or have suggestions, open an issue or PR.


If you want, I can also generate a minimal README template for each language directory to keep everything consistent.

About

My LeetCode solutions in Java, Go, JavaScript/TypeScript, and Python. Focus on Data Structures and Algorithms (DSA), optimization, and fluency in multiple languages for technical interviews. Organized by algorithmic patterns.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •