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.

When should I use the HashSet<T> type?

I am exploring the HashSet<T> type, but I don't understand where it stands in collections. Can one …

c# .net data-structures hashset
Converting YAML file to python dict

I am having the following problem of mapping documents within a YAML file to a dict and properly mapping them. …

python data-structures dictionary yaml
Advantages of Binary Search Trees over Hash Tables

What are the advantages of binary search trees over hash tables? Hash tables can look up any element in Theta(1) …

data-structures hashtable binary-search-tree
How are Python's Built In Dictionaries Implemented?

Does anyone know how the built in dictionary type for python is implemented? My understanding is that it is some …

python data-structures dictionary
Linq - SelectMany Confusion

From what I understand from the documentation of SelectMany, one could use it to produce a (flattened) sequence of a 1…

c# linq data-structures linq-to-objects
How to achieve this Map<String, List<>> structure

I have data like below: Key value ----- ------ car toyota car bmw car honda fruit apple fruit banana computer …

java data-structures multimap multi-mapping
What would a "frozen dict" be?

A frozen set is a frozenset. A frozen list could be a tuple. What would a frozen dict be? An …

python dictionary data-structures immutability
invalid use of template name without an argument list

I am facing a problem with my linked list class, I have created the interface and implementation files of the …

c++ templates data-structures linked-list
TreeMap or HashMap?

When to use hashmaps or treemaps? I know that I can use TreeMap to iterate over the elements when I …

java data-structures
Constructing a Binary tree in Java

I am constructing a binary tree. Let me know if this is a right way to do it. If not …

java data-structures binary-tree implementation