Skip to content

sureshkumartibirisetti/LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


🌟 LeetCode Problem Solutions

Welcome to my GitHub repository where I’ve uploaded solutions for various problems from LeetCode! This repo is a compilation of my solutions across a variety of coding challenges that test different aspects of problem-solving, data structures, and algorithms. Each solution is structured for clarity, efficiency, and understanding. ✨

📚 About This Repository

This repository contains solutions to problems categorized by difficulty level — Easy, Medium, and Hard — covering a wide range of topics such as:

  • 🟦 Arrays and Strings
  • 🟩 Linked Lists
  • 🟥 Stacks and Queues
  • 🌳 Trees and Graphs
  • 🚀 Dynamic Programming
  • 💡 Greedy Algorithms
  • 🧩 Sorting and Searching
  • 🔄 Backtracking
  • 🔁 Recursion
  • 🗂️ Hash Maps
  • ➕ Math-related problems

All solutions are written in Java and follow best practices to ensure clarity and efficiency. Each problem is aimed at improving algorithmic thinking and enhancing coding efficiency.

🔎 How to Use This Repository

You can browse through the different folders, which are categorized by problem type or difficulty level. Each folder contains:

  • 📝 Problem statement: A link to the original problem on LeetCode.
  • 💻 Code solutions: Fully functional code for the problem.
  • 🔍 Explanation: Solutions are commented for easy understanding of the approach and logic used.
  • Time and space complexity: Annotations specifying the complexity of each solution.

🤔 Why LeetCode?

LeetCode is an excellent platform for enhancing coding skills and preparing for technical interviews. With challenges ranging from easy to hard, it’s a great way to get better at solving algorithmic problems while deepening your understanding of core computer science concepts. Through this repository, I aim to showcase my journey of growth and improvement in problem-solving. 🏆

🗂️ Repository Structure

Here’s a quick glance at how the repository is organized:

📂 Easy
   ├── Problem_1_Two_Sum.java
   ├── Problem_7_Reverse_Integer.java
   └── ...
📂 Medium
   ├── Problem_2_Add_Two_Numbers.java
   ├── Problem_19_Remove_Nth_Node_From_End_of_List.java
   └── ...
📂 Hard
   ├── Problem_23_Merge_k_Sorted_Lists.java
   ├── Problem_239_Sliding_Window_Maximum.java
   └── ...

Each file contains code with explanations and complexity analysis.

🤝 How to Contribute

If you'd like to contribute to this repository, feel free to:

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

Any contributions are welcome to enhance or add to the problem solutions! 🚀

📅 Future Enhancements

I plan to add the following features to this repository soon:

  • 🧪 Test cases for each problem to ensure correctness.
  • 📝 More detailed explanations and approach discussions for harder problems.
  • 🌐 Solutions in other languages such as Python, C++, etc.

🙌 Acknowledgments

A big thanks to the LeetCode community and everyone maintaining the platform for providing such an amazing resource to improve coding skills and prepare for interviews. 🏅

Feel free to explore and learn from this repository, and I hope it helps you on your own journey to becoming a better coder! Happy coding! 😄👨‍💻👩‍💻


📊 LeetCode Profile

🔗LeetCode Profile
Solved Problems:
🔹 Easy
🔸 Medium
🔺 Hard


LeetCode Topics

Array

0001-two-sum
0004-median-of-two-sorted-arrays
0011-container-with-most-water
0014-longest-common-prefix
0015-3sum
0026-remove-duplicates-from-sorted-array
0027-remove-element
0075-sort-colors
0078-subsets
0088-merge-sorted-array
0189-rotate-array
0287-find-the-duplicate-number
0448-find-all-numbers-disappeared-in-an-array
0495-teemo-attacking
0500-keyboard-row
0594-longest-harmonious-subsequence
0674-longest-continuous-increasing-subsequence
0697-degree-of-an-array
0717-1-bit-and-2-bit-characters
0941-sort-array-by-parity
0958-sort-array-by-parity-ii
1478-maximum-number-of-events-that-can-be-attended
1510-find-lucky-integer-in-an-array
2265-partition-array-according-to-given-pivot
2271-rearrange-array-elements-by-sign
2320-find-all-k-distant-indices-in-an-array
2551-apply-operations-to-an-array
2707-merge-two-2d-arrays-by-summing-values
3334-apple-redistribution-into-boxes
3490-find-the-maximum-length-of-valid-subsequence-i
3491-find-the-maximum-length-of-valid-subsequence-ii

Hash Table

0001-two-sum
0003-longest-substring-without-repeating-characters
0012-integer-to-roman
0013-roman-to-integer
0448-find-all-numbers-disappeared-in-an-array
0500-keyboard-row
0594-longest-harmonious-subsequence
0697-degree-of-an-array
1472-increasing-decreasing-string
1510-find-lucky-integer-in-an-array
2707-merge-two-2d-arrays-by-summing-values
3353-existence-of-a-substring-in-a-string-and-its-reverse

Sliding Window

0003-longest-substring-without-repeating-characters
0594-longest-harmonious-subsequence

Sorting

0015-3sum
0075-sort-colors
0088-merge-sorted-array
0594-longest-harmonious-subsequence
0941-sort-array-by-parity
0958-sort-array-by-parity-ii
1478-maximum-number-of-events-that-can-be-attended
3334-apple-redistribution-into-boxes

Counting

0594-longest-harmonious-subsequence
1472-increasing-decreasing-string
1510-find-lucky-integer-in-an-array

String

0003-longest-substring-without-repeating-characters
0012-integer-to-roman
0013-roman-to-integer
0014-longest-common-prefix
0058-length-of-last-word
0125-valid-palindrome
0151-reverse-words-in-a-string
0168-excel-sheet-column-title
0344-reverse-string
0345-reverse-vowels-of-a-string
0500-keyboard-row
0520-detect-capital
0557-reverse-words-in-a-string-iii
0680-valid-palindrome-ii
1302-delete-characters-to-make-fancy-string
1472-increasing-decreasing-string
1818-maximum-score-from-removing-substrings
1894-merge-strings-alternately
2128-reverse-prefix-of-word
2816-lexicographically-smallest-palindrome
3353-existence-of-a-substring-in-a-string-and-its-reverse
3396-valid-word
3566-find-the-sequence-of-strings-appeared-on-the-screen
3617-find-the-original-typed-string-i
3618-find-the-original-typed-string-ii

Simulation

0495-teemo-attacking
2265-partition-array-according-to-given-pivot
2271-rearrange-array-elements-by-sign
2551-apply-operations-to-an-array
3566-find-the-sequence-of-strings-appeared-on-the-screen
3600-find-the-k-th-character-in-string-game-i

Math

0007-reverse-integer
0009-palindrome-number
0012-integer-to-roman
0013-roman-to-integer
0029-divide-two-integers
0168-excel-sheet-column-title
0189-rotate-array
0405-convert-a-number-to-hexadecimal
0504-base-7
0507-perfect-number
1411-convert-binary-number-in-a-linked-list-to-integer
3600-find-the-k-th-character-in-string-game-i
3601-find-the-k-th-character-in-string-game-ii

Dynamic Programming

3490-find-the-maximum-length-of-valid-subsequence-i
3491-find-the-maximum-length-of-valid-subsequence-ii
3618-find-the-original-typed-string-ii

Prefix Sum

3618-find-the-original-typed-string-ii

Bit Manipulation

0029-divide-two-integers
0078-subsets
0287-find-the-duplicate-number
0405-convert-a-number-to-hexadecimal
3600-find-the-k-th-character-in-string-game-i
3601-find-the-k-th-character-in-string-game-ii

Recursion

3600-find-the-k-th-character-in-string-game-i
3601-find-the-k-th-character-in-string-game-ii

Greedy

0011-container-with-most-water
0680-valid-palindrome-ii
1478-maximum-number-of-events-that-can-be-attended
1818-maximum-score-from-removing-substrings
2816-lexicographically-smallest-palindrome
3334-apple-redistribution-into-boxes

Heap (Priority Queue)

1478-maximum-number-of-events-that-can-be-attended

Binary Search

0004-median-of-two-sorted-arrays
0287-find-the-duplicate-number

Divide and Conquer

0004-median-of-two-sorted-arrays

Two Pointers

0011-container-with-most-water
0015-3sum
0026-remove-duplicates-from-sorted-array
0027-remove-element
0075-sort-colors
0088-merge-sorted-array
0125-valid-palindrome
0151-reverse-words-in-a-string
0189-rotate-array
0287-find-the-duplicate-number
0344-reverse-string
0345-reverse-vowels-of-a-string
0557-reverse-words-in-a-string-iii
0680-valid-palindrome-ii
0941-sort-array-by-parity
0958-sort-array-by-parity-ii
1894-merge-strings-alternately
2128-reverse-prefix-of-word
2265-partition-array-according-to-given-pivot
2271-rearrange-array-elements-by-sign
2320-find-all-k-distant-indices-in-an-array
2551-apply-operations-to-an-array
2707-merge-two-2d-arrays-by-summing-values
2816-lexicographically-smallest-palindrome

Trie

0014-longest-common-prefix

Backtracking

0078-subsets

Stack

1818-maximum-score-from-removing-substrings
2128-reverse-prefix-of-word

Linked List

1411-convert-binary-number-in-a-linked-list-to-integer

Database

0183-customers-who-never-order

About

Solved problem in Leetcode

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published