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.

Simplest code for array intersection in javascript

What's the simplest, library-free code for implementing array intersections in javascript? I want to write intersection([1,2,3], [2,3,4,5]) and get [2, 3]

javascript data-structures intersection
Select Multiple Fields from List in Linq

In ASP.NET C# I have a struct: public struct Data { public int item1; public int item2; public int category_…

c# linq data-structures
How do you implement a Stack and a Queue in JavaScript?

What is the best way to implement a Stack and a Queue in JavaScript? I'm looking to do the shunting-yard …

javascript data-structures stack queue
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 …

c# data-structures
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?

python data-structures tree
How do I remove objects from an array in Java?

Given an array of n Objects, let's say it is an array of strings, and it has the following values: …

java arrays data-structures data-manipulation
What are the lesser known but useful data structures?

There are some data structures around that are really useful but are unknown to most programmers. Which ones are they? …

language-agnostic data-structures computer-science
Calculate size of Object in Java

I want to record how much memory (in bytes, hopefully) an object takes up for a project (I'm comparing sizes …

java memory memory-management data-structures
How do I instantiate a Queue object in java?

When I try: Queue<Integer> q = new Queue<Integer>(); the compiler is giving me an error. …

java data-structures queue