Top "Data-structures" questions

A data structure is a way of organizing data in a fashion that allows particular properties of that data to be queried and/or updated efficiently.

What's the difference between the data structure Tree and Graph?

Academically speaking, what's the essential difference between the data structure Tree and Graph? And how about the tree based search …

search data-structures map tree
Difference between a HashMap and a dictionary ADT

What is the difference between a Hash Map and dictionary ADT. And when to prefer one over another. For my …

java data-structures
How to find nth element from the end of a singly linked list?

The following function is trying to find the nth to last element of a singly linked list. For example: If …

algorithm linked-list data-structures
Which data structure would you use: TreeMap or HashMap? (Java)

Description | A Java program to read a text file and print each of the unique words in alphabetical order together …

java data-structures map hashmap treemap
Representing graphs (data structure) in Python

How can one neatly represent a graph in Python? (Starting from scratch i.e. no libraries!)What data structure (e.…

python data-structures graph
golang why don't we have a set datastructure

I'm trying to solve "The go programming lanaguage" exercise #1.4 which requires me to have a set. I can create a …

data-structures go set
What is the difference between a map and a dictionary?

I know a map is a data structure that maps keys to values. Isn't a dictionary the same? What is …

dictionary data-structures language-agnostic key-value
Get "Value" property in IGrouping

I have a data structure like public DespatchGroup(DateTime despatchDate, List<Products> products); And I am trying to …

c# linq data-structures igrouping
Explanation of runtimes of BFS and DFS

Why are the running times of BFS and DFS O(V+E), especially when there is a node that has …

data-structures graph time-complexity depth-first-search breadth-first-search
Why is std::map implemented as a red-black tree?

Why is std::map implemented as a red-black tree? There are several balanced binary search trees (BSTs) out there. What …

c++ dictionary data-structures stl binary-search-tree