This repository contains my solutions to Leetcode problems. Here, I will share some basic easy-level problems along with their Python solutions.
-
Two Sum
- Problem: Given an array of integers
numsand an integertarget, return the indices of the two numbers such that they add up totarget. - Solution: The solution uses a dictionary to track the numbers and their indices while iterating through the array.
- Link: Leetcode Two Sum Problem
- Problem: Given an array of integers
-
Palindrome Number
- Problem: Given an integer
x, returntrueifxis a palindrome, andfalseotherwise. - Solution: The solution converts the integer to a string and checks if the string reads the same backward.
- Link: Leetcode Palindrome Number Problem
- Problem: Given an integer
-
Clone this repository to your local machine:
git clone https://github.com/devashish24460/Leetcode-Solutions.git