Skip to content

xyfer17/DSA-for-Interview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DSA for Interview 🚀

Welcome to the DSA for Interview repository! This repository is dedicated to solving data structures and algorithms (DSA) questions from LeetCode in Go, JavaScript and Ruby. Our goal is to help others learn and contribute by providing well-explained, efficient solutions to various DSA problems.

Feel free to contribute by adding your solutions or improving existing ones! 🤝

How to Contribute

  1. Fork this repository.
  2. Create a new branch for your solution.
  3. Add your solution under the respective language folder (go/ or javascript/ or ruby/).
  4. Update the corresponding table in the README.md with the problem details.
  5. Open a pull request, and we will review and merge it.

📂 Directory Structure

.
├── go/               # Go solutions
├── javascript/       # JavaScript solutions
├── ruby/             # Ruby solutions
└── README.md         # Repository details and problem tracking

📜 LeetCode Questions Solved

Below is the list of LeetCode DSA problems solved in Go and JavaScript. Each row links to the specific LeetCode problem and the corresponding solution.


Go Solutions

# Problem Type Difficulty Solution
1 Two Sum Array Easy Go Solution
2 Longest Common Prefix Array Easy Go Solution
3 Palindrome Number Math Easy Go Solution
4 Remove Duplicates from Sorted List Linked List Easy Go Solution
5 Best Time to Buy and Sell Stock Array Easy Go Solution
6 Container with Most Water Array Medium Go Solution
7 Rotate Image Array Medium Go Solution
8 Rotate List Linked List Medium Go Solution
9 Search in Rotated Sorted Array Array, Binary Search Medium Go Solution
10 Trapping Rain Water Array Hard Go Solution
11 Find First and Last Position of Element in Sorted Array Array, Binary Search Medium -
12 Remove Duplicates from Sorted Array II Array Medium Go Solution
13 Search Insert Position Array Easy Go Solution
14 Valid Sudoku Array Medium Go Solution
15 Count and Say Array Medium Go Solution
16 Add Two Numbers Linked List Medium Go Solution
... ... ... ... ...

JavaScript Solutions

# Problem Type Difficulty Solution
1 Two Sum Array Easy -
2 Longest Common Prefix Array Easy -
3 Palindrome Number Math Easy -
4 Remove Duplicates from Sorted List Linked List Easy -
5 Best Time to Buy and Sell Stock Array Easy -
6 Container with Most Water Array Medium -
7 Rotate Image Array Medium -
8 Rotate List Linked List Medium -
9 Search in Rotated Sorted Array Array, Binary Search Medium -
10 Trapping Rain Water Array Hard -
11 Find First and Last Position of Element in Sorted Array Array, Binary Search Medium -
12 Remove Duplicates from Sorted Array II Array Medium -
13 Search Insert Position Array Easy -
14 Valid Sudoku Array Medium -
15 Count and Say Array Medium -
16 Add Two Numbers Linked List Medium -
... ... ... ... ...

Ruby Solutions

# Problem Type Difficulty Solution
1 Two Sum Array Easy -
2 Longest Common Prefix Array Easy -
3 Palindrome Number Math Easy -
4 Remove Duplicates from Sorted List Linked List Easy -
5 Best Time to Buy and Sell Stock Array Easy Ruby Solution
6 Container with Most Water Array Medium -
7 Rotate Image Array Medium Ruby Solution
8 Rotate List Linked List Medium -
9 Search in Rotated Sorted Array Array, Binary Search Medium -
10 Trapping Rain Water Array Hard -
11 Find First and Last Position of Element in Sorted Array Array, Binary Search Medium -
12 Remove Duplicates from Sorted Array II Array Medium -
13 Search Insert Position Array Easy -
14 Valid Sudoku Array Medium -
15 Count and Say Array Medium -
16 Add Two Numbers Linked List Medium -
... ... ... ... ...

Contribution Guidelines

  • Ensure your code is clean, well-documented, and follows best practices.
  • Add the LeetCode problem link and the solution link in the respective table above.
  • Feel free to optimize or add new solutions!

Happy coding! 😄

Company wise leetcode questions list

About

DSA Problem Solution for Interview

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published