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.

Is there pointer in C# like C++? Is it safe?

I'm writing an application that work with a tree data structure. I've written it with C++, now i want to …

c# c++ data-structures tree
Hash : How does it work internally?

This might sound as an very vague question upfront but it is not. I have gone through Hash Function description …

java algorithm data-structures hash
Why start an ArrayList with an initial capacity?

The usual constructor of ArrayList is: ArrayList<?> list = new ArrayList<>(); But there is also an overloaded …

java data-structures arraylist capacity
What is the best way to combine two lists into a map (Java)?

It would be nice to use for (String item: list), but it will only iterate through one list, and you'd …

java data-structures collections
ArrayList Vs LinkedList

I was following a previous post on this that says: For LinkedList get is O(n) add is O(1) remove …

java data-structures collections arraylist linked-list
Time complexity of python set operations?

What is the the time complexity of each of python's set operations in Big O notation? I am using Python's …

python data-structures set complexity-theory big-o
Split a collection into `n` parts with LINQ?

Is there a nice way to split a collection into n parts with LINQ? Not necessarily evenly of course. That …

c# .net linq data-structures
Why should I use Deque over Stack?

I need a Stack data structure for my use case. I should be able to push items into the data …

java data-structures
Difference between O(n) and O(log(n)) - which is better and what exactly is O(log(n))?

This is my first course in data structures and every lecture / TA lecture , we talk about O(log(n)) . This …

algorithm data-structures complexity-theory big-o logarithm
Relative performance of std::vector vs. std::list vs. std::slist?

For a simple linked list in which random access to list elements is not a requirement, are there any significant …

c++ data-structures stl performance linked-list