导图社区 数据结构实现与算法解析
超级实用的数据结构实现与算法解来啦!JS、JAVA 数据结构算法实现,内部附有开源项目链接,还有掘金平台和思否平台的技术文章链接哦!需要的小伙伴赶紧收藏起来吧!
编辑于2019-03-21 03:43:38数据结构与算法
Arrays(数组)、
class:MyArray
method:constructor
method:getSize
method:getCapacity
method:isEmpty
method:resize
method:insert
method:unshift
method:push
method:add
method:get
method:getFirst
method:getLast
method:set
method:contain
method:find
method:findAll
method:remove
method:shift
method:pop
method:removeElement
method:removeAllElement
method:swap
method:toString
Stacks(栈)、
class:MyStack
method:constructor
method:push
method:pop
method:peek
method:getSize
method:isEmpty
method:getCapacity
method:toString
Queues(队列)、
class:MyQueue
method:constructor
method:enqueue
method:dequeue
method:getFront
method:getSize
method:getCapacity
method:isEmpty
method:toString
class:MyLoopQueue
method:constructor
method:resize
method:enqueue
method:dequeue
method:getFront
method:getSize
method:getCapacity
method:isEmpty
method:toString
LinkedList(链表)、
class:MyLinkedListNode
method:constructor
method:appendToLinkedListNode
method:toString
class:MyLinkedList
method:constructor
method:getSize
method:isEmpty
method:addFirst
method:insert
method:addLast
method:get
method:getFirst
method:getLast
method:set
method:contains
method:remove
method:removeFirst
method:removeLast
method:removeElement
method:toString
Recursion(递归思想)、
class:MyLinkedListStack
method:constructor
method:push
method:pop
method:peek
method:getSize
method:isEmpty
method:toString
class:MyLinkedListQueue
method:constructor
method:enqueue
method:dequeue
method:getFront
method:getSize
method:isEmpty
method:toString
BinarySearchTree(二分搜索树)、
class:MyBinarySearchTreeNode
method:constructor
class:MyBinarySearchTree
method:constructor
method:add
method:recursiveAdd
method:contains
method:recursiveContains
method:maximum
method:recursiveMaximum
method:removeMax
method:recursiveRemoveMax
method:minimum
method:recursiveMinimum
method:removeMin
method:recursiveRemoveMin
method:remove
method:recursiveRemove
method:preOrder
method:recursivePreOrder
method:nonRecursivePreOrder
method:inOrder
method:recursiveInOrder
method:postOrder
method:recursivePostOrder
method:levelOrder
method:getSize
method:isEmpty
method:compare
method:toString
method:getBinarySearchTreeString
method:getDepthString
Set(集合)、
class:MyBinarySearchTreeSet
method:constructor
method:add
method:remove
method:contains
method:each
method:getSize
method:isEmpty
class:MyLinkedListSet
method:constructor
method:add
method:remove
method:contains
method:each
method:getSize
method:isEmpty
Map(映射)、
class:MyLinkedListMapNode
method:constructor
method:toString
class:MyLinkedListMap
method:constructor
method:getNode
method:add
method:remove
method:get
method:set
method:contains
method:getSize
method:isEmpty
method:toString
class:MyBinarySearchTreeMapNode
method:constructor
method:toString
class:MyBinarySearchTreeMap
method:constructor
method:compare
method:getNode
method:add
method:recursiveAdd
method:remove
method:recursiveRemove
method:maximum
method:removeMax
method:get
method:set
method:contains
method:getSize
method:isEmpty
method:toString
Heap(堆)、
class:MyMaxHeap
method:constructor
method:add
method:siftUp
method:recursiveSiftUp
method:nonRecursiveSiftUp
method:findMax
method:extractMax
method:siftDown
method:recursiveSiftDown
method:nonRecursiveSiftDown
method:replace
method:heapify
method:swap
method:calcParentIndex
method:calcLeftChildIndex
method:calcRightChildIndex
method:compare
method:size
method:isEmpty
PriorityQueue(优先队列)、
class:MyPriorityQueue
method:constructor
method:enqueue
method:dequeue
method:getFront
method:getSize
method:isEmpty
method:updateCompare
method:replaceFront
SegmentTree(线段树)、
class:MySegmentTree
method:constructor
method:getSize
method:get
method:buildingSegmentTree
method:query
method:recursiveQuery
method:set
method:recursiveSet
method:calcLeftChildIndex
method:calcRightChildIndex
method:merge
method:updateMerge
method:toString
Trie(字典树)、
class:MyTrieNode
method:constructor
class:MyTrie
method:constructor
method:add
method:recursiveAdd
method:recursiveAddFn
method:remove
method:recursiveRemove
method:contains
method:recursiveContains
method:recursiveContainsFn
method:isPrefix
method:regexpSearch
method:match
method:getSize
method:isEmpty
class:MyTrieSet
method:constructor
method:add
method:remove
method:contains
method:getSize
method:isEmpty
class:MyTrieNodeUpgrade
method:constructor
class:MyTrieUpgrade
method:constructor
method:add
method:put
method:recursivePut
method:recursivePutFn
method:remove
method:recursiveRemove
method:get
method:getPrefixAll
method:recursiveGetPrefixAllInfo
method:recursiveGetPrefixAllTreeInfo
method:contains
method:recursiveContains
method:recursiveContainsFn
method:isPrefix
method:regexpSearch
method:match
method:getSize
method:isEmpty
class:MyTrieMap
method:constructor
method:add
method:get
method:remove
method:contains
method:set
method:getKeys
method:getValues
method:getSize
method:isEmpty
UnionFind(并查集)、
class:MyUnionFind
method:constructor
method:unionElements
method:isConnected
method:getSize
class:MyUnionFindOne
method:constructor
method:unionElements
method:isConnected
method:find
method:getSize
class:MyUnionFindTwo
method:constructor
method:unionElements
method:isConnected
method:find
method:getSize
class:MyUnionFindThree
method:constructor
method:unionElements
method:isConnected
method:find
method:getSize
class:MyUnionFindFour
method:constructor
method:unionElements
method:isConnected
method:find
method:getSize
class:MyUnionFindFive
method:constructor
method:unionElements
method:isConnected
method:find
method:getSize
class:MyUnionFindSix
method:constructor
method:unionElements
method:isConnected
method:find
method:getSize
AVLTree(AVL平衡树树)、
class:MyAVLTreeNode
method:constructor
method:toString
class:MyAVLTree
method:constructor
method:compare
method:getHeight
method:getBalanceFactor
method:getNode
method:rightRotate
method:leftRotate
method:add
method:recursiveAdd
method:remove
method:recursiveRemove
method:maximum
method:removeMax
method:get
method:set
method:contains
method:getSize
method:isEmpty
method:isBanarySearchTree
method:inOrder
method:getKeys
method:getEntitys
method:isBalanced
method:recursiveIsBalanced
method:toString
class:MyAVLTreeSet
method:constructor
method:add
method:remove
method:contains
method:getSize
method:isEmpty
class:MyAVLTreeMap
method:constructor
method:add
method:get
method:getKeys
method:getEntitys
method:remove
method:contains
method:set
method:getSize
method:isEmpty
RedBlackTree(红黑平衡树)、
class:MyRedBalckTreeNode
method:constructor
method:toString
class:MyRedBlackTree
method:constructor
method:isRed
method:leftRotate
method:flipColors
method:rightRotate
method:compare
method:getNode
method:add
method:recursiveAdd
method:remove
method:recursiveRemove
method:maximum
method:removeMax
method:get
method:set
method:contains
method:getSize
method:isEmpty
method:toString
class:MyRedBlackSet
method:constructor
method:add
method:remove
method:contains
method:getSize
method:isEmpty
class:MyRedBlackMap
method:constructor
method:add
method:get
method:remove
method:contains
method:set
method:getSize
method:isEmpty
HashTable(哈希表)
class:MyHash
method:constructor
method:hashCode
method:calcHashOne
method:calcHashTwo
class:MyHashTableBySystem
method:constructor
method:hash
method:getSize
method:add
method:remove
method:set
method:contains
method:get
class:MyHashTableByAVLTree
method:constructor
method:hash
method:getSize
method:add
method:remove
method:set
method:contains
method:get
method:resize
其它辅助类
class:Main
method:constructor
method:show
method:alterLine
class:PerformanceTest
method:testQueue
method:testStack
method:testSet
method:testMap
method:testHeap
method:testUnionFind
method:calcTime
method:testCustomFn
class:ListNode
method:constructor
method:appendToLinkedListNode
method:toString
class:Calc
method:sum
method:tailSum
class:Solution
method:isValid
method:removeElements
method:uniqueMorseRepresentations
method:intersection
method:intersect
method:topKFrequent
method:NumArray
method:NumArray2
method:Trie
method:WordDictionary
method:MapSum
method:firstUniqChar
class:Student
method:constructor
method:hashCode
method:equals
method:getCode
method:toString
数据结构解析和算法实现:https://github.com/ilovejwl/MaoDataStructures