Skip to content

Niteesh57/Problem-Solving-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 

Repository files navigation

Problem-Solving-Python

LeetCode Solutions

Welcome to my LeetCode solutions repository! This repository contains my solutions to various LeetCode problems, categorized by difficulty level. Each solution is written in Python and includes a link to the corresponding LeetCode problem.

Table of Contents

Introduction

This repository is a collection of my solutions to LeetCode problems. I have organized the solutions by difficulty level and provided the source code along with the link to the problem.

How to Use

  1. Navigate to the folder corresponding to the difficulty level you are interested in (e.g., Easy, Medium, Hard).
  2. Find the solution by the problem name or number.
  3. Open the corresponding Python file to view the solution.

Solutions

Easy

Problem Link Solution Difficulty
Valid Palindrome Solution Easy
Two Sum Solution Easy
Palindrome Number Solution Easy
Remove Duplicates from Sorted Array Solution Easy
Find the Index of the First Occurrence in a String Solution Easy
Search Insert Position Solution Easy
Length of Last Word Solution Easy
Plus One Solution Easy
Sqrt(x) Solution Easy
Climbing Stairs Solution Easy
Merge Sorted Array Solution Easy
Single Number Solution Easy
Summary Ranges Solution Easy
Ugly Number Solution Easy
Majority Element Solution Easy
Happy Number Solution Easy
Add Digits Solution Easy
Valid Anagram Solution Easy
Missing Number Solution Easy
Move Zeroes Solution Easy
Word Pattern Solution Easy
Nim Game Solution Easy
Reverse String Solution Easy
Reverse Vowels of a String Solution Easy
Counting Bits Solution Easy
Intersection of Two Arrays Solution Easy
First Unique Character in a String Solution Easy
Find the Difference Solution Easy
Ransom Note Solution Easy
Is Subsequence Solution Easy
Longest Palindrome Solution Easy
Fizz Buzz Solution Easy
Third Maximum Number Solution Easy
Number of Segments in a String Solution Easy
Arranging Coins Solution Easy
Find All Numbers Disappeared in an Array Solution Easy
Assign Cookies Solution Easy
Repeated Substring Pattern Solution Easy
Hamming Distance Solution Easy
Number Complement Solution Easy
License Key Formatting Solution Easy
Max Consecutive Ones Solution Easy
Next Greater Element I Solution Easy
Keyboard Row Solution Easy
Base 7 Solution Easy
Relative Ranks Solution Easy
Longest Uncommon Subsequence I Solution Easy
Detect Capital Solution Easy
Reverse String II Solution Easy
Reverse Words in a String III Solution Easy
Array Partition Solution Easy
Distribute Candies Solution Easy
Longest Harmonious Subsequence Solution Easy
Can Place Flowers Solution Easy
Minimum Index Sum of Two Lists Solution Easy
Set Mismatch Solution Easy
Maximum Average Subarray I Solution Easy
Robot Return to Origin Solution Easy
Baseball Game Solution Easy
Binary Number with Alternating Bits Solution Easy
Count Binary Substrings Solution Easy
To Lower Case Solution Easy
Self Dividing Numbers Solution Easy
Largest Number At Least Twice of Others Solution Easy
Shortest Completing Word Solution Easy
Longest Continuous Increasing Subsequence Solution Easy
Prime Number of Set Bits in Binary Representation Solution Easy
Jewels and Stones Solution Easy
Rotate String Solution Easy
Unique Morse Code Words Solution Easy
Number of Lines to Write String Solution Easy
Most Common Word Solution Easy
Shortest Distance to a Character Solution Easy
Goat Latin Solution Easy
Positions of Large Groups Solution Easy
Flipping an Image Solution Easy
Backspace String Compare Solution Easy
Buddy Strings Solution Easy
Lemonade Change Solution Easy
Transpose Matrix Solution Easy
Binary Gap Solution Easy
Uncommon Words from Two Sentences Solution Easy
Optimal Partition of String Solution Easy
The K-th Factor of N Solution Easy
Monotonic Array Solution Easy
Reverse Only Letters Solution Easy
Sort Array by Parity II Solution Easy
Unique Email Addresses Solution Easy
Long Pressed Name Solution Easy
Number of Recent Calls Solution Easy
Valid Mountain Array Solution Easy
DI String Match Solution Easy
Delete Columns to Make Sorted Solution Easy
N-Repeated Element in Size 2N Array Solution Easy
Squares of a Sorted Array Solution Easy
Find the Town Judge Solution Easy
Find Common Characters Solution Easy
Maximize Sum of Array After K Negations Solution Easy
Complement of Base 10 Integer Solution Easy
Divisor Game Solution Easy
Binary Prefix Divisible by 5 Solution Easy
Remove Outermost Parentheses Solution Easy
Partition Array Into Three Parts With Equal Sum Solution Easy
Remove All Adjacent Duplicates In String Solution Easy
Maximum Number of Balloons Solution Easy
Relative Sort Array Solution Easy
Height Checker Solution Easy
Occurrences After Bigram Solution Easy
Duplicate Zeros Solution Easy
Distribute Candies to People Solution Easy
Defanging an IP Address Solution Easy
Number of Equivalent Domino Pairs Solution Easy
Minimum Absolute Difference Solution Easy
N-th Tribonacci Number Solution Easy
Day of the Year Solution Easy
Find Words That Can Be Formed by Characters Solution Easy
Unique Number of Occurrences Solution Easy
Split a String in Balanced Strings Solution Easy
Find Numbers with Even Number of Digits Solution Easy
Replace Elements with Greatest Element on Right Side Solution Easy
Find N Unique Integers Sum up to Zero Solution Easy
Find Lucky Integer in an Array Solution Easy
Decrypt String from Alphabet to Integer Mapping Solution Easy
Decompress Run-Length Encoded List Solution Easy
Convert Integer to the Sum of Two No-Zero Integers Solution Easy
Maximum 69 Number Solution Easy
Rank Transform of an Array Solution Easy
The K Weakest Rows in a Matrix Solution Easy
Number of Steps to Reduce a Number to Zero Solution Easy
Check If N and Its Double Exist Solution Easy
Count Negative Numbers in a Sorted Matrix Solution Easy
Sort Integers by The Number of 1 Bits Solution Easy
How Many Numbers Are Smaller than the Current Number Solution Easy
Increasing Decreasing String Solution Easy
Generate a String With Characters That Have Odd Counts Solution Easy
Lucky Numbers in a Matrix Solution Easy
Number of 1 Bits Solution Easy
Linked List Cycle Solution Easy
Remove Linked List Elements Solution Easy
Middle of the Linked List Solution Easy
Remove Duplicates from Sorted List Solution Easy
Power of Three Solution Easy
Reverse Linked List Solution Easy
Fibonacci Number Solution Easy
Maximum Score After Splitting a String Solution Easy
String Matching in an Array Solution Easy
Contains Duplicate II Solution Easy
Find the K-Beauty of a Number Solution Easy
Minimum Recolors to Get K Consecutive Black Blocks Solution Easy
Defuse the Bomb Solution Easy
Check If Two Chessboard Squares Have the Same Color Solution Easy
Kids With the Greatest Number of Candies Solution Easy
Check if All 1's Are at Least Length K Places Away Solution Easy
Consecutive Characters Solution Easy
Check If a Word Occurs as a Prefix of Any Word in a Sentence Solution Easy
Make Two Arrays Equal by Reversing Subarrays Solution Easy
Maximum Product of Two Elements in an Array Solution Easy
Shuffle the Array Solution Easy
XOR Operation in an Array Solution Easy
Sort Array by Parity Solution Easy
Create Target Array in the Given Order Solution Easy
Minimum Subsequence in Non-Increasing Order Solution Easy
Intersection of Two Linked Lists Solution Easy
Minimum Bit Flips to Convert Number Solution Easy
Count the Number of Consistent Strings Solution Easy
Reformat Date Solution Easy
Kth Largest Element in a Stream Solution Easy
Binary Tree Inorder Traversal Solution Easy
Path Sum Solution Easy
Binary Tree Preorder Traversal Solution Easy
Binary Tree Postorder Traversal Solution Easy
Count Complete Tree Nodes Solution Easy
Same Tree Solution Easy
Rank Transform of an Array Solution Easy

Medium

Problem Link Solution Difficulty
Longest Palindromic Substring Solution Medium
String to Integer (atoi) Solution Medium
Container With Most Water Solution Medium
Divide Two Integers Solution Medium
3Sum Solution Medium
Find First and Last Position of Element in Sorted Array Solution Medium
4Sum Solution Medium
3Sum Closest Solution Medium
Remove Nth Node From End of List Solution Medium
Multiply Strings Solution Medium
Remove Duplicates from Sorted Array II Solution Medium
Delete Node in a Linked List Solution Medium
Permutations Solution Medium
Subsets Solution Medium
Delete Nodes from Linked List Present in Array Solution Medium
Remove Duplicates from Sorted List II Solution Medium
Partition List Solution Medium
Subsets II Solution Medium
Insert Greatest Common Divisors in Linked List Solution Medium
Single Number II Solution Medium
Linked List Cycle II Solution Medium
Insertion Sort List Solution Medium
Reverse Words in a String Solution Medium
Min Stack Solution Medium
Find Peak Element Solution Medium
XOR Queries of a Subarray Solution Medium
Longest Subarray with Maximum Bitwise AND Solution Medium
Maximum Gap Solution Medium
Compare Version Numbers Solution Medium
Two Sum II (Input Array Is Sorted) Solution Medium
Rotate Array Solution Medium
Largest Number Solution Medium
Smallest Value of the Rearranged Number Solution Medium
Kth Largest Element in an Array Solution Medium
Lexicographical Numbers Solution Medium
Maximum Product Subarray Solution Medium
Factorial Trailing Zeroes Solution Medium
Find the Length of the Longest Common Prefix Solution Medium
My Calendar I Solution Medium
Add Two Numbers Solution Medium
Design Circular Deque Solution Medium
Sum Root to Leaf Numbers Solution Medium
Check if Array Pairs Are Divisible by K Solution Medium
Binary Tree Right Side View Solution Medium

Hard

Contact

If you have any questions or suggestions, feel free to reach out to me at niteesh.bv@gmail.com.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages