A linked list is a collection of items where each item points to the next one in the list. Because of this structure, linked lists are very slow when searching for an item at a particular index. An array, by comparison, has quick gets when searching…
In a tree, nodes have a single parent node and may have many children nodes. They never have more than one parent nor point to any siblings. The most common tree structure you see is a web page. The underlying structure is often called the "DOM tree&…
A stack is a collection of items that obeys the principle of "last in, first out". Like a stack of plates, we can only access the topmost plate at any time. We must remove that plate before we get down to other plates. This is useful for functio…
A graph is a data structure comprised of a set of nodes, also known as vertices, and a set of edges. Each node in a graph may point to any other node in the graph. This is very useful for things like describing networks, creating related nonhierarchi…
Source, git Heap is a data structure that can fundamentally change the performance of fairly common algorithms in Computer Science. The heap data structure is called a heap because it satisfies the heap property. The heap property states, that if P i…
For example we have an array of words: [car, done, try, cat, trie, do] What is the best data structure to store the data and easy for search? We can use Trie data structure, it is a tree, but not a binary tree. The reuslts of constructing a tree by u…
题目 Source http://acm.hdu.edu.cn/showproblem.php?pid=5739 Description Professor Zhang has an undirected graph G with n vertices and m edges. Each vertex is attached with a weight wi. Let Gi be the graph after deleting the i-th vertex from graph G. Pro…
题目链接: Basic Data Structure Time Limit: 7000/3500 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 207    Accepted Submission(s): 41 Problem Description Mr. Frog learned a basic data structure recently, which is called…
Data Structure Problem Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.uestc.edu.cn/#/problem/show/483 Description Data structure is a fundamental course of Computer Science, so that each contestant is highly likely to solve this data structu…
Basic Data Structure Time Limit: 7000/3500 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 872    Accepted Submission(s): 236 Problem Description Mr. Frog learned a basic data structure recently, which is called stac…