Skip to content

Maxx1432/datastructure

Repository files navigation

Data Structures & Algorithms Repository

This repository contains implementations of various data structures and solutions to coding problems, primarily from LeetCode. It serves as a comprehensive collection of fundamental computer science concepts and algorithmic problem-solving techniques.

📁 Repository Structure

Core Data Structures

  • BinaryTree.java - Binary tree implementation with basic operations
  • CircularLinkedList.java - Circular linked list implementation
  • DoublyLinkedList.java - Doubly linked list with forward and backward traversal
  • singlyLinkedList.Java - Basic singly linked list implementation
  • Queue.java - Queue data structure implementation
  • Stack.java - Stack implementation with standard operations
  • StackUsingArray.java - Array-based stack implementation

Algorithm Implementations

  • NextGreaterElement.java - Finding next greater element in arrays
  • ReverseStringInStack.java - String reversal using stack

LeetCode Solutions

The Leetcode/ folder contains solutions to various LeetCode problems organized by categories:

Array & String Problems

  • Two Sum, Three Sum
  • Best Time to Buy and Sell Stock (I & II)
  • Move Zeroes, Rotate Array
  • Valid Palindrome, Valid Anagram
  • Group Anagrams, First Unique Character
  • And many more...

Linked List Problems

  • Reverse Linked List
  • Remove Nth Node from End
  • Delete Middle Node
  • Merge K Sorted Lists

Binary Tree Problems

  • In-order, Pre-order, Post-order Traversals
  • Tree node implementation

Binary Search Problems

  • Find Smallest Letter Greater Than Target

🚀 Getting Started

This repository is written in Java. To run any of the implementations:

  1. Clone the repository
  2. Compile the Java files using javac
  3. Run the desired program using java

Example:

javac BinaryTree.java
java BinaryTree

📚 Purpose

This repository serves as:

  • A reference for common data structure implementations
  • Practice solutions for coding interviews
  • Study material for algorithms and data structures
  • A collection of LeetCode problem solutions with explanations

🤝 Contributing

Feel free to add more data structure implementations or LeetCode solutions. Make sure to follow consistent coding style and add appropriate comments.

📝 Notes

Each implementation focuses on clarity and educational value, making it easy to understand the underlying concepts and algorithms.

About

All the datastructure implementeation and program

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages