项目
在 GitHub 查看
sherxon/AlgoDS
关于
算法和数据结构、问题与解决方案的实现
学习与教育实测星标增长
- 24小时
- -1
- 7天
- -1
- 15天
- -3
- 1个月
- -4
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文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:
- Easy Questions and Answers
- Medium Questions and Answers
- Hard Questions and Answers
Problems:
Arrays
- Rotate Array
- Contains Duplicate
- Find Peak Element
- Maximum Subarray
- Kth Largest Element in an Array
- Find All Duplicates in an Array
- Longest Increasing Subsequence
- Rotate Image, matrix
- Shuffle an Array
- Find Min in Rotated Array
- Search in Rotated Array
Linked List
- Singly Linked List Implementation
- Doubly Linked List Implementation
- Delete Node in a Linked List
- Palindrome Linked List
- Reverse Linked List
- Intersection of Two Linked Lists
- Linked List Cycle
- Remove Nth Node From End of List
- Merge Sort List
- Find Linked List Cycle
- Merge k Sorted Lists
And many other Linked list problems
Binary Tree
- Binary Tree Level Order Traversal
- Sum of Left Leaves
- Invert Binary Tree
- Binary Search Tree Iterator
- Binary Tree Postorder Traversal
- Binary Tree Preorder Traversal
- Flatten Binary Tree to Linked List
- Symmetric Tree
- Binary Tree Inorder Traversal
- Same Tree
- Maximum Depth of Binary Tree
- Balanced Binary Tree
- Minimum Depth of Binary Tree
- Sorted List to Balanced Binary Search Tree
- Validate Binary Search Tree
- Sorted List to Balanced BST
- Kth Smallest Element in a BST
- Binary Tree Zigzag Level Order Traversal
- Delete Node in a BST
- Lowest Common Ancestor of BST
- Binary Tree Left Side View
- Binary Tree Right Side View
- Mode in BST
- Most Frequent Subtree Sum
- Find Largest Element in Each Row
- Serialize and Deserialize BT
And many other tree problems
Math
- Integer Break
- Reverse Bits
- Palindrome Number
- Math.pow
- Jug and Water Problem
- Sieve of Eratosthenes
- Fermat's primality
- Evaluate Reverse Polish Notation
Stack & Queue
Dynamic Programming
- Fibonacci Numbers
- Word Break
- Subset Sum
- 0/1 Knapsack Problem
- Shortest Palindrome (KMP)
- Minimum Square Sum
- Maximum weight transformation of a String
- Coin Change
Misc
Algorithms
Sorting And Searching
- Bubble Sort
- Insertion Sort
- Selection Sort
- Counting Sort
- Binary Search , Lower & Upper Bounds
- MergeSort
- QuickSort
Graphs
- Breadth First Search (BFS)
- Depth First Search (DFS)
- Prim's Minimum Spanning Tree (MST)
- KrusKal's Minimum Spanning Tree (MST)
- Topological Sorting
- Shortest Path Dijsktra
- Shortest Path Bellman-Ford
- A* Heuristic Path Finding
- Is Graph Bipartite
- Is Graph Connected
- Cycle Detection
- Undirected Graph Bridge Detection
String
- Rabin Karp Subsequence search
- Ransom Note
- Reverse String
- Longest Common Prefix
- Is Anagram
- Needle and Haystack
- Word Break
- Meta Strings
Data Structure:
Trees
- Binary Search Tree (recursive)
- Binary Search Tree (iterative)
- AVL Tree
- Trie (Prefix tree)
- Hashed Array Tree
- LRU Cache
Contribute
Did you find a bug? Any way to do it better? Please feel free to pull-request it. :)
探索相关项目
加载中…