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.

How are multi-dimensional arrays formatted in memory?

In C, I know I can dynamically allocate a two-dimensional array on the heap using the following code: int** someNumbers = …

c arrays memory data-structures stack-memory
What is an "internal node" in a binary search tree?

I'm scouring the internet for a definition of the term "Internal Node." I cannot find a succinct definition. Every source …

data-structures binary-tree
Finding anagrams for a given word

Two words are anagrams if one of them has exactly same characters as that of the another word. Example : Anagram &…

algorithm data-structures language-agnostic anagram
How do you validate a binary search tree?

I read on here of an exercise in interviews known as validating a binary search tree. How exactly does this …

algorithm data-structures binary-search-tree
Pre-order to post-order traversal

If the pre-order traversal of a binary search tree is 6, 2, 1, 4, 3, 7, 10, 9, 11, how to get the post-order traversal?

algorithm data-structures tree-traversal binary-search-tree
Visual C++ equivalent of GCC's __attribute__ ((__packed__))

For some compilers, there is a packing specifier for structs, for example :: RealView ARM compiler has "__packed" Gnu C Compiler …

c++ c visual-c++ gcc data-structures
Test whether a list contains a specific value in Clojure

What is the best way to test whether a list contains a given value in Clojure? In particular, the behaviour …

data-structures clojure
How do I make and use a Queue in Objective-C?

I want to use a queue data structure in my Objective-C program. In C++ I'd use the STL queue. What …

objective-c cocoa data-structures queue
Algorithm for autocomplete?

I am referring to the algorithm that is used to give query suggestions when a user types a search term …

algorithm autocomplete scalability data-structures autosuggest
Objects vs arrays in Javascript for key/value pairs

Say you have a very simple data structure: (personId, name) ...and you want to store a number of these in …

javascript data-structures