返回排行榜

sherxon/AlgoDS

Javasherxon.com

Implementation of Algorithms and Data Structures, Problems and Solutions

interview-questionsbstalgorithmssortdata-structruesjavagraph-algorithmsbinary-search-treelinked-listdfsmergesortsorting-algorithms
Star 增长趋势
Star
3.4k
Forks
602
周增长
Issues
4
1k2k3k
2016年12月2020年2月2023年5月2026年7月
制品库Mavengit clone https://github.com/sherxon/AlgoDS.git
README

English | 简体中文

Algorithms and Data Structures

This is the collection of Algorithms, Data Structures and Interview Questions with solutions. This repository contains my solutions for common algorithmic problems and implementation of Data Structures in Java. I've created this repository to learn about algorithms. I am adding solutions continuously.

Algorithms, Data Structures and more than 300 Problems and Solutions are provided so far.

Questions

Here are questions divided by difficulty level:

  1. Easy Questions and Answers
  2. Medium Questions and Answers
  3. Hard Questions and Answers

Problems:

Arrays

  1. Rotate Array
  2. Contains Duplicate
  3. Find Peak Element
  4. Maximum Subarray
  5. Kth Largest Element in an Array
  6. Find All Duplicates in an Array
  7. Longest Increasing Subsequence
  8. Rotate Image, matrix
  9. Shuffle an Array
  10. Find Min in Rotated Array
  11. Search in Rotated Array

Linked List

  1. Singly Linked List Implementation
  2. Doubly Linked List Implementation
  3. Delete Node in a Linked List
  4. Palindrome Linked List
  5. Reverse Linked List
  6. Intersection of Two Linked Lists
  7. Linked List Cycle
  8. Remove Nth Node From End of List
  9. Merge Sort List
  10. Find Linked List Cycle
  11. Merge k Sorted Lists
    And many other Linked list problems

Binary Tree

  1. Binary Tree Level Order Traversal
  2. Sum of Left Leaves
  3. Invert Binary Tree
  4. Binary Search Tree Iterator
  5. Binary Tree Postorder Traversal
  6. Binary Tree Preorder Traversal
  7. Flatten Binary Tree to Linked List
  8. Symmetric Tree
  9. Binary Tree Inorder Traversal
  10. Same Tree
  11. Maximum Depth of Binary Tree
  12. Balanced Binary Tree
  13. Minimum Depth of Binary Tree
  14. Sorted List to Balanced Binary Search Tree
  15. Validate Binary Search Tree
  16. Sorted List to Balanced BST
  17. Kth Smallest Element in a BST
  18. Binary Tree Zigzag Level Order Traversal
  19. Delete Node in a BST
  20. Lowest Common Ancestor of BST
  21. Binary Tree Left Side View
  22. Binary Tree Right Side View
  23. Mode in BST
  24. Most Frequent Subtree Sum
  25. Find Largest Element in Each Row
  26. Serialize and Deserialize BT
    And many other tree problems

Math

  1. Integer Break
  2. Reverse Bits
  3. Palindrome Number
  4. Math.pow
  5. Jug and Water Problem
  6. Sieve of Eratosthenes
  7. Fermat's primality
  8. Evaluate Reverse Polish Notation

Stack & Queue

  1. Min Stack
  2. Min Queue
  3. Implement Stack Using Queue
  4. Implement Queue Using Stack
  5. Sort Stack

Dynamic Programming

  1. Fibonacci Numbers
  2. Word Break
  3. Subset Sum
  4. 0/1 Knapsack Problem
  5. Shortest Palindrome (KMP)
  6. Minimum Square Sum
  7. Maximum weight transformation of a String
  8. Coin Change

Misc

  1. Union Find
  2. Permutations
  3. Subsets

Algorithms

Sorting And Searching

  1. Bubble Sort
  2. Insertion Sort
  3. Selection Sort
  4. Counting Sort
  5. Binary Search , Lower & Upper Bounds
  6. MergeSort
  7. QuickSort

Graphs

  1. Breadth First Search (BFS)
  2. Depth First Search (DFS)
  3. Prim's Minimum Spanning Tree (MST)
  4. KrusKal's Minimum Spanning Tree (MST)
  5. Topological Sorting
  6. Shortest Path Dijsktra
  7. Shortest Path Bellman-Ford
  8. A* Heuristic Path Finding
  9. Is Graph Bipartite
  10. Is Graph Connected
  11. Cycle Detection
  12. Undirected Graph Bridge Detection

String

  1. Rabin Karp Subsequence search
  2. Ransom Note
  3. Reverse String
  4. Longest Common Prefix
  5. Is Anagram
  6. Needle and Haystack
  7. Word Break
  8. Meta Strings

Data Structure:

Trees

  1. Binary Search Tree (recursive)
  2. Binary Search Tree (iterative)
  3. AVL Tree
  4. Trie (Prefix tree)
  5. Hashed Array Tree
  6. LRU Cache

Contribute

Did you find a bug? Any way to do it better? Please feel free to pull-request it. :)

相关仓库
donnemartin/system-design-primer

Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

PythonPyPIOtherprogrammingdevelopment
358.7k57.3k
yangshun/tech-interview-handbook

Curated coding interview preparation materials for busy software engineers

TypeScriptnpmMIT Licenseinterview-questionscoding-interviews
techinterviewhandbook.org
141.1k16.7k
labuladong/fucking-algorithm

Crack LeetCode, not only how, but also why.

Markdownleetcodealgorithms
labuladong.online
134.9k23.6k
ByteByteGoHq/system-design-101

Explain complex systems using visuals and simple terms. Help you prepare for system design interviews.

Otherawscloud-computing
bytebytego.com/guides
86.3k9.6k
DopplerHQ/awesome-interview-questions

:octocat: A curated awesome list of lists of interview questions. Feel free to contribute! :mortar_board:

awesome-listawesomeness
doppler.com
83.7k9.5k
bregman-arie/devops-exercises

Linux, Jenkins, AWS, SRE, Prometheus, Docker, Python, Ansible, Git, Kubernetes, Terraform, OpenStack, SQL, NoSQL, Azure, GCP, DNS, Elastic, Network, Virtualization. DevOps Interview Questions

PythonPyPIOtherdevopsaws
83.3k19.8k
binhnguyennus/awesome-scalability

The Patterns of Scalable, Reliable, and Performant Large-Scale Systems

MIT Licensesystem-designbackend
72.6k7k
kdn251/interviews

Everything you need to know to get the job.

JavaMavenMIT Licensejavainterview
youtube.com/channel/UCKvwPt6BifPP54yzH99ff1g
65.1k12.9k
h5bp/Front-end-Developer-Interview-Questions

A list of helpful front-end related questions you can use to interview potential candidates, test yourself or completely ignore.

NunjucksMIT Licenseinterview-questionscss-questions
h5bp.org/Front-end-Developer-Interview-Questions/
60.9k11k
sudheerj/reactjs-interview-questions

List of top 500 ReactJS Interview Questions & Answers....Coding exercise questions are coming soon!!

JavaScriptnpmMIT Licensereactjsreact-router
44.7k10.4k
yangshun/front-end-interview-handbook

Front End interview preparation materials for busy engineers (updated for 2026)

MDXMIT Licensefront-endinterview-questions
frontendinterviewhandbook.com
44k5.9k
ashishps1/awesome-system-design-resources

Learn System Design concepts and prepare for interviews using free resources.

JavaMavenGNU General Public License v3.0awesomebackend
algomaster.io
39.8k8.5k