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 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 …

python data-structures heap recursive-datastructures
What is the time complexity of indexing, inserting and removing from common data structures?

There is no summary available of the big O notation for operations on the most common data structures including arrays, …

data-structures complexity-theory big-o
How to determine if binary tree is balanced?

It's been a while from those school years. Got a job as IT specialist at a hospital. Trying to move …

java algorithm data-structures binary-tree
How to clone object in C++ ? Or Is there another solution?

I wrote a Stack and Queue implementation (Linked List based). There is one stack (bigStack). For example, I separate bigStack (…

c++ data-structures stack queue
How would you implement an LRU cache in Java?

Please don't say EHCache or OSCache, etc. Assume for purposes of this question that I want to implement my own …

java caching data-structures lru
Find kth smallest element in a binary search tree in Optimum way

I need to find the kth smallest element in the binary search tree without using any static/global variable. How …

algorithm data-structures binary-tree binary-search
Data structure for maintaining tabular data in memory?

My scenario is as follows: I have a table of data (handful of fields, less than a hundred rows) that …

python data-structures
What are the time complexities of various data structures?

I am trying to list time complexities of operations of common data structures like Arrays, Binary Search Tree, Heap, Linked …

java data-structures time-complexity
Why do we use arrays instead of other data structures?

As I was programming, I haven't seen an instance where an array is better for storing information than another form …

arrays data-structures
Practical uses of different data structures

There's a lot of talk about data structures, but I can't find a simple list of data structures and their …

data-structures