Rust Data Structures and Algorithms for LeetCode

This repository contains a collection of data structures, algorithms, and solutions to LeetCode problems implemented in Rust programming language. The purpose of this project is to provide a resource for learning and practicing data structures, algorithms, and problem-solving skills using Rust.

Data Structures

In the data_structures directory, you will find various implementations of commonly used data structures, such as:

  • Array
  • Linked List
  • Stack
  • Queue
  • Binary Tree
  • Binary Search Tree
  • Heap
  • Hash Table
  • Graph
  • and more...

Each data structure is implemented in Rust and provides essential operations and functionality. The implementations aim to be efficient, generic, and easy to understand.

Algorithms

The algorithms directory contains implementations of fundamental algorithms used in computer science and programming, including:

  • Sorting algorithms (e.g., Bubble Sort, Insertion Sort, Merge Sort, Quick Sort)
  • Searching algorithms (e.g., Linear Search, Binary Search)
  • Graph algorithms (e.g., Breadth-First Search, Depth-First Search, Dijkstra's Algorithm)
  • Dynamic Programming
  • Recursion and Backtracking
  • and more...

These algorithm implementations are accompanied by explanations and examples to aid in understanding their concepts and usage.

LeetCode Solutions

The leetcode directory houses solutions to a variety of LeetCode problems. Each solution is implemented in Rust and provides a detailed explanation of the problem, approach, and the implementation itself. The solutions aim to be efficient and follow best practices in terms of algorithm design and code readability.

The LeetCode solutions are organized into separate files based on problem difficulty and category, making it easy to navigate and find specific problems of interest.

Contributing

Contributions to this project are welcome! If you have any improvements, bug fixes, or new data structures/algorithms/solutions to add, feel free to submit a pull request. Please follow the existing code style and ensure that your additions are well-documented and include appropriate test cases.

License

This project is licensed under the MIT License. Feel free to use, modify, and distribute the code for personal or commercial purposes.