Tag: struct

56 votes
18 answers
1.7K views
How to convert List to Map?

Recently I have conversation with a colleague about what would be the optimal way to convert List to Map in Ja

avatar
Benton
0 1 0 9
asked 07 September, 2021
59 votes
20 answers
1.8K views
Tree data structure in C#

I was looking for a tree or graph data structure in C# but I guess there isn't one provided. An Extensive

avatar
Kurtis
0 1 0 9
asked 07 September, 2021
56 votes
16 answers
1.7K views
How can I implement a tree in Python?

I am trying to construct a General tree. Are there any built-in data structures in Python to implement it?

avatar
Bryan
0 1 0 9
asked 07 September, 2021
55 votes
11 answers
1.4K views
Does VBA have Dictionary Structure?

Does VBA have dictionary structure? Like key<>value array?

avatar
Xavier
0 1 0 9
asked 07 September, 2021
59 votes
17 answers
373 views
What do I use for a max-heap implementation in Python?

Python includes the heapq module for min-heaps, but I need a max heap. What should I use for a max-heap imple

avatar
Suzan
0 1 0 9
asked 07 September, 2021
63 votes
14 answers
2.1K views
What is C# analog of C++ std::pair?

I'm interested: What is C#'s analog of std::pair in C++? I found System.Web.UI.Pair class, but I&apo

avatar
Virgil
0 1 0 9
asked 07 September, 2021
54 votes
14 answers
2K views
What are the differences between B trees and B+ trees?

In a b-tree you can store both keys and data in the internal and leaf nodes, but in a b+ tree you have to stor

avatar
Winford
0 1 0 9
asked 07 September, 2021
65 votes
12 answers
1.3K views
In Python, when to use a Dictionary, List or Set?

When should I use a dictionary, list or set? Are there scenarios that are more suited for each data type?

avatar
Ali
0 1 0 9
asked 07 September, 2021
57 votes
3 answers
3.1K views
What are the underlying data structures used for Redis?

I'm trying to answer two questions in a definitive list: What are the underlying data structures used fo

avatar
Charis
0 1 0 9
asked 07 September, 2021
57 votes
13 answers
1.7K views
How to Correctly Use Lists in R?

Brief background: Many (most?) contemporary programming languages in widespread use have at least a handful of

avatar
Keith
0 1 0 9
asked 07 September, 2021
66 votes
10 answers
1.8K views
What is the difference between tree depth and height?

This is a simple question from algorithms theory. The difference between them is that in one case you count nu

avatar
Alba
0 1 0 9
asked 07 September, 2021
63 votes
12 answers
2.3K views
Difference between binary tree and binary search tree

Can anyone please explain the difference between binary tree and binary search tree with an example?

avatar
Xavier
0 1 0 9
asked 07 September, 2021
60 votes
3 answers
458 views
How are Python&apos;s Built In Dictionaries Implemented?

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

avatar
Juliane
0 1 0 9
asked 07 September, 2021
60 votes
16 answers
2.4K views
Why should hash functions use a prime number modulus?

A long time ago, I bought a data structures book off the bargain table for $1.25. In it, the explanation for

avatar
Hilario
0 1 0 9
asked 07 September, 2021
58 votes
17 answers
372 views
JavaScript hashmap equivalent

As made clear in update 3 on this answer, this notation: var hash = {}; hash[X] does not actually hash the ob

avatar
Tana
0 1 0 9
asked 07 September, 2021
62 votes
6 answers
1.3K views
Preserving order with LINQ

I use LINQ to Objects instructions on an ordered array. Which operations shouldn't I do to be sure the o

avatar
Keila
0 1 0 9
asked 07 September, 2021
55 votes
14 answers
808 views
Why does the C++ STL not provide any "tree" containers?

Why does the C++ STL not provide any "tree" containers, and what's the best thing to use instead? I want

avatar
Jefferey
0 1 0 9
asked 07 September, 2021
59 votes
30 answers
2.9K views
Split List into Sublists with LINQ

Is there any way I can separate a List<SomeObject> into several separate lists of SomeObject, using the

avatar
Lashawna
0 1 0 9
asked 07 September, 2021
58 votes
16 answers
2.9K views
When should I use a List vs a LinkedList

When is it better to use a List vs a LinkedList?

avatar
Jesenia
0 1 0 9
asked 07 September, 2021
54 votes
21 answers
2.7K views
How to implement a queue using two stacks?

Suppose we have two stacks and no other temporary variable. Is to possible to "construct" a queue data struct

avatar
Yolando
0 1 0 9
asked 07 September, 2021