Gang Of Coders
Home
About Us
Contact Us
All Data Structures Solutions on Gang of Coders
Total of 254 Data Structures Solutions
Good algorithm and data structure for looking up words with missing letters?
Algorithm
Data Structures
How does 3D collision / object detection work?
Algorithm
Data Structures
3d
Collision Detection
Check if a binary tree is a mirror image or symmetric
Algorithm
Language Agnostic
Data Structures
Binary Tree
What is the best way to create a sparse array in C++?
C++
Oop
Data Structures
Hash
Maps
Is there a "Set" data structure in .Net?
C#
Data Structures
Set
Implementing a HashMap in C
C
Data Structures
Hashmap
Learning Algorithms and Data Structures Fundamentals
Algorithm
Data Structures
Does standard c library provides linked list etc. data structures?
C
Gcc
Data Structures
Glibc
Whats the difference between objects and data structures?
Java
Oop
Object
Data Structures
Language Agnostic
KDTree Implementation in Java
Java
Data Structures
Kdtree
Which data structure would you use: TreeMap or HashMap? (Java)
Java
Data Structures
Map
Hashmap
Treemap
What is the Zipper data structure and should I be using it?
Data Structures
Functional Programming
Theory
Zipper
C - How to implement Set data structure?
C
Algorithm
Math
Data Structures
Set
Removing elements from a list containing specific characters
Python
List
Data Structures
Why exactly do we need a "Circular Linked List" (singly or doubly) data structure?
C
Data Structures
Linked List
Circular List
Java collections maintaining insertion order
Java
Data Structures
Collections
Computing an md5 hash of a data structure
Python
Data Structures
Md5
Why hashmap lookup is O(1) i.e. constant time?
Data Structures
Hash
Hashmap
Hashtable
Big O
Algorithm/Data Structure Design Interview Questions
Algorithm
Data Structures
Relative performance of std::vector vs. std::list vs. std::slist?
C++
Data Structures
Stl
Performance
Linked List
Stack and Queue, Why?
Data Structures
Stack
Queue
How is vector implemented in C++
C++
Data Structures
Alternatives to Entity-Attribute-Value (EAV)?
Database
Database Design
Data Structures
Data Modeling
Entity Attribute-Value
How to implement 3 stacks with one array?
Algorithm
Data Structures
Stack
Stack with find-min/find-max more efficient than O(n)?
Java
Algorithm
Data Structures
Stack
Big O
data structure used to implement UNDO and REDO option
Data Structures
Design Patterns
Undo Redo
Data structure for text editor
Data Structures
Text Editor
What are "sums-and-products" data structures?
Data Structures
Programming Languages
Types
Type Systems
Algebraic Data-Types
What's the best way to return a pair of values in Java?
Java
Data Structures
Efficient implementation of binary heaps
C++
Data Structures
Performance
Computer Science
Priority Queue
Difference between AVL trees and splay trees
Algorithm
Data Structures
Binary Search-Tree
Avl Tree
Splay Tree
Mastering Recursive Programming
Algorithm
Recursion
Data Structures
Recursive Datastructures
Circular buffer in JavaScript
Javascript
Data Structures
Circular Buffer
Is there pointer in C# like C++? Is it safe?
C#
C++
Data Structures
Tree
How can I implement a tree in Python?
Python
Data Structures
Tree
Queue vs Dequeue in java
Java
Data Structures
Queue
Deque
Does VBA have Dictionary Structure?
Vba
Dictionary
Data Structures
Vb6
What are good examples of problems that graphs can solve better than the alternative?
Data Structures
Graph
Graph Theory
Doubly Linked List in a Purely Functional Programming Language
Data Structures
Haskell
Functional Programming
Linked List
Text editor theory
Data Structures
Editor
Text Editor
Theory
What is the distinction between sparse and dense graphs?
Data Structures
Graph
Graph Theory
Binary Search Tree - Java Implementation
Java
Data Structures
Tree
Ukkonen's suffix tree algorithm in plain English
String
Algorithm
Data Structures
Language Agnostic
Suffix Tree
Tree data structure in C#
C#
Data Structures
How to convert List to Map?
Java
List
Data Structures
Hashmap
Data Conversion
Skip List vs. Binary Search Tree
Algorithm
Language Agnostic
Data Structures
Binary Tree
Skip Lists
Why doesn't java.util.Set have get(int index)?
Java
Data Structures
Collections
Set
What is the difference between a map and a dictionary?
Dictionary
Data Structures
Language Agnostic
Key Value
Priority queue in .Net
C#
.Net
Data Structures
Heap
Priority Queue
golang why don't we have a set datastructure
Data Structures
Go
Set
Python Sets vs Lists
Python
List
Performance
Data Structures
Set
Why should I use Deque over Stack?
Java
Data Structures
Stack
Deque
.Net Data structures: ArrayList, List, HashTable, Dictionary, SortedList, SortedDictionary -- Speed, memory, and when to use each?
C#
.Net
vb.net
Arrays
Data Structures
What is the best way to implement nested dictionaries?
Python
Data Structures
Dictionary
Mapping
Autovivification
Why is std::map implemented as a red-black tree?
C++
Dictionary
Data Structures
Stl
Binary Search-Tree
Array versus linked-list
Arrays
Data Structures
Linked List
Language Agnostic
Why do we use arrays instead of other data structures?
Arrays
Data Structures
How is set() implemented?
Python
Data Structures
Set
Cpython
How are multi-dimensional arrays formatted in memory?
C
Arrays
Memory
Data Structures
Stack Memory
Get keys from HashMap in Java
Java
Data Structures
Java 6
How to print binary tree diagram in Java?
Java
Data Structures
Printing
Binary Tree
How does the HyperLogLog algorithm work?
Database
Algorithm
Math
Data Structures
Hyperloglog
What is the difference between Python's list methods append and extend?
Python
List
Data Structures
Append
Extend
Simplest code for array intersection in javascript
Javascript
Data Structures
Intersection
How do you implement a Stack and a Queue in JavaScript?
Javascript
Data Structures
Stack
Queue
How do I clear the std::queue efficiently?
C++
Data Structures
Stl
Queue
What would a "frozen dict" be?
Python
Dictionary
Data Structures
Immutability
Are duplicate keys allowed in the definition of binary search trees?
Data Structures
Computer Science
Binary Tree
Test whether a list contains a specific value in Clojure
Data Structures
Clojure
Why would anyone use set instead of unordered_set?
C++
Algorithm
Data Structures
C++11
What are the lesser known but useful data structures?
Language Agnostic
Data Structures
Computer Science
lenses, fclabels, data-accessor - which library for structure access and mutation is better
Data Structures
Haskell
Record
Lenses
How to implement a Map with multiple keys?
Java
Data Structures
How to merge YAML arrays?
List
Data Structures
Yaml
What's the difference between the data structure Tree and Graph?
Search
Data Structures
Map
Tree
Get "Value" property in IGrouping
C#
Linq
Data Structures
Igrouping
How would you implement an LRU cache in Java?
Java
Caching
Data Structures
Lru
What is copy-on-write?
Optimization
Design Patterns
Data Structures
Copy on-Write
Proxy Pattern
HashMap get/put complexity
Java
Data Structures
Hashmap
Complexity Theory
Calculate size of Object in Java
Java
Memory
Memory Management
Data Structures
How to avoid "too many parameters" problem in API design?
C#
Data Structures
Immutability
How to check if a specific key is present in a hash or not?
Ruby
Data Structures
Associative Array
How to create the most compact mapping n → isprime(n) up to a limit N?
Algorithm
Math
Data Structures
Primes
Why start an ArrayList with an initial capacity?
Java
Data Structures
Arraylist
Capacity
How Do I Choose Between a Hash Table and a Trie (Prefix Tree)?
Algorithm
Data Structures
Hashtable
Trie
Has anyone actually implemented a Fibonacci-Heap efficiently?
Performance
Algorithm
Language Agnostic
Data Structures
Fibonacci Heap
How do I instantiate a Queue object in java?
Java
Data Structures
Queue
How to convert SQL Query result to PANDAS Data Structure?
Python
Mysql
Data Structures
Pandas
Select Multiple Fields from List in Linq
C#
Linq
Data Structures
Quick Way to Implement Dictionary in C
C
Data Structures
Dictionary
Implement Stack using Two Queues
Algorithm
Data Structures
Stack
Red black tree over avl tree
Algorithm
Data Structures
Red Black-Tree
When should I use the HashSet<T> type?
C#
.Net
Data Structures
Hashset
How do I represent a hextile/hex grid in memory?
Data Structures
Data structures for loaded dice?
Algorithm
Language Agnostic
Data Structures
Random
Probability
B-Tree vs Hash Table
Mysql
Data Structures
Computer Science
Complexity Theory
B Tree
Are there strongly-typed collections in Objective-C?
Objective C
Generics
Data Structures
Collections
Strong Typing
Representing graphs (data structure) in Python
Python
Data Structures
Graph
What does it mean for a data structure to be "intrusive"?
C++
C
Language Agnostic
Data Structures
Terminology
How to implement a queue with three stacks?
Algorithm
Data Structures
Given a string of a million numbers, return all repeating 3 digit numbers
Python
Algorithm
Data Structures
Number Theory
How do I create a Linked List Data Structure in Java?
Java
Data Structures
Linked List
How to implement a binary tree?
Python
Algorithm
Search
Data Structures
Binary Tree
When to use Preorder, Postorder, and Inorder Binary Search Tree Traversal strategies
Data Structures
Computer Science
Binary Tree
Preorder
What is the advantage to using bloom filters?
Algorithm
Data Structures
Bloom Filter
Under what circumstances are linked lists useful?
Language Agnostic
Data Structures
Linked List
Are there any open source C libraries with common data structures?
C
Data Structures
Split a collection into `n` parts with LINQ?
C#
.Net
Linq
Data Structures
design a stack such that getMinimum( ) should be O(1)
Algorithm
Language Agnostic
Data Structures
Stack
LinkedBlockingQueue vs ConcurrentLinkedQueue
Java
Multithreading
Data Structures
Concurrency
Queue
How do I sort a list of dictionaries by a value of the dictionary?
Python
List
Sorting
Dictionary
Data Structures
Does Java support structs?
Java
Data Structures
Algorithm to find top 10 search terms
Algorithm
Data Structures
Advantages of Binary Search Trees over Hash Tables
Data Structures
Hashtable
Binary Search-Tree
What's the best way of structuring data on firebase?
Firebase
Data Structures
Nosql
Firebase Realtime-Database
How to determine if binary tree is balanced?
Java
Algorithm
Data Structures
Binary Tree
Time complexity of python set operations?
Python
Data Structures
Set
Complexity Theory
Big O
What is the difference between trie and radix trie data structures?
Algorithm
Data Structures
Tree
Patricia Trie
Radix Tree
Find kth smallest element in a binary search tree in Optimum way
Algorithm
Data Structures
Binary Tree
Binary Search
How to reverse a singly linked list using only two pointers?
C
Algorithm
Data Structures
Linked List
Singly Linked-List
How to implement a tree data-structure in Java?
Java
Data Structures
Tree
Check if two linked lists merge. If so, where?
Algorithm
Linked List
Data Structures
When would I want to use a heap?
Data Structures
Heap
How does a hash table work?
Data Structures
Hash
Hashtable
Modulo
Graph visualization library in JavaScript
Javascript
Jquery
Data Structures
Graph Layout
Reversing a linked list in Java, recursively
Java
Data Structures
Recursion
Linked List
How do I make and use a Queue in Objective-C?
Objective C
Cocoa
Data Structures
Queue
Data structure: insert, remove, contains, get random element, all at O(1)
Data Structures
Practical uses of different data structures
Data Structures
Why does Dijkstra's algorithm use decrease-key?
Algorithm
Data Structures
Priority Queue
Graph Algorithm
Dijkstra
Hash table runtime complexity (insert, search and delete)
Algorithm
Data Structures
Hash
Time Complexity
Hashtable
What are the time complexities of various data structures?
Java
Data Structures
Time Complexity
How to choose between map and unordered_map?
C++
Dictionary
Data Structures
Stl
Unordered Map
Why can I define structures and classes within a function in C++?
C++
Data Structures
Functional Programming
Most efficient way to store thousand telephone numbers
Algorithm
Data Structures
Is there any way to enforce typing on NSArray, NSMutableArray, etc.?
Objective C
Generics
Data Structures
Collections
Strong Typing
How to detect a loop in a linked list?
Java
Algorithm
Data Structures
Linked List
When is a ConcurrentSkipListSet useful?
Java
Data Structures
Collections
Concurrency
Reading a C/C++ data structure in C# from a byte array
C#
.Net
Data Structures
Marshalling
Why is there no Tree<T> class in .NET?
C#
.Net
Data Structures
Hashable, immutable
Python
Data Structures
Hash
Immutability
What is the difference between a KD-tree and a R-tree?
Data Structures
Kdtree
R Tree
Difference between xs and xsd in XML schema file?
Xml
Data Structures
Xsd
Sorted array list in Java
Java
Data Structures
Sorted
How to implement a queue using two stacks?
Algorithm
Data Structures
Stack
Queue
When to choose RB tree, B-Tree or AVL tree?
Data Structures
Tree
B Tree
Avl Tree
Red Black-Tree
Algorithms based on number base systems?
Algorithm
Math
Data Structures
Numbers
Number Systems
Suffix tree and Tries. What is the difference?
Algorithm
Data Structures
Trie
Suffix Tree
Efficient (and well explained) implementation of a Quadtree for 2D collision detection
Data Structures
Collision
Rectangles
Quadtree
When should I use a List vs a LinkedList
C#
.Net
vb.net
Data Structures
Linked List
Choice of programming language for learning data structures and algorithms
Algorithm
Data Structures
Language Agnostic
Dynamically add data to a javascript map
Javascript
Data Structures
Maps
Yui
Difference between "Complete binary tree", "strict binary tree","full binary Tree"?
Data Structures
Tree
Binary Tree
How do I remove objects from an array in Java?
Java
Arrays
Data Structures
Data Manipulation
Split List into Sublists with LINQ
C#
Linq
Data Structures
How to make heapq evaluate the heap off of a specific attribute?
Python
Data Structures
Heap
What is the best way to combine two lists into a map (Java)?
Java
Data Structures
Collections
What is the purpose of collections.ChainMap?
Python
Python 3.x
Dictionary
Data Structures
Collections
Data structure for maintaining tabular data in memory?
Python
Data Structures
LRU cache design
C++
Algorithm
Data Structures
Lru
Linq - SelectMany Confusion
C#
Linq
Data Structures
Linq to-Objects
Difference between red-black trees and AVL trees
Data Structures
Tree
Language Agnostic
Avl Tree
Red Black-Tree
Objects vs arrays in Javascript for key/value pairs
Javascript
Data Structures
What is the underlying data structure for Python lists?
Python
List
Data Structures
What is the fastest (to access) struct-like object in Python?
Python
Performance
Data Structures
Implement a queue in which push_rear(), pop_front() and get_min() are all constant time operations
Algorithm
Data Structures
Queue
Big O
How do you implement a circular buffer in C?
C
Data Structures
Circular Buffer
Why does the C++ STL not provide any "tree" containers?
C++
Data Structures
Tree
Stl
Best implementation for Key Value Pair Data Structure?
C#
Data Structures
Collections
Is using flexible array members in C bad practice?
C
Arrays
Data Structures
Flexible Array-Member
Algorithm for autocomplete?
Algorithm
Autocomplete
Scalability
Data Structures
Autosuggest
Difference between O(n) and O(log(n)) - which is better and what exactly is O(log(n))?
Algorithm
Data Structures
Complexity Theory
Big O
Logarithm
What's the difference between heapq and PriorityQueue in python?
Python
Data Structures
Heap
Priority Queue
Why are Fibonacci numbers significant in computer science?
Algorithm
Math
Data Structures
Fibonacci
What is Python's heapq module?
Python
Data Structures
Heap
Python Module
Is there a more efficient implementation for a bidirectional map?
C++
C++11
Data Structures
Map
Bimap
JavaScript hashmap equivalent
Javascript
Data Structures
Language Features
Hashmap
Preserving order with LINQ
C#
Arrays
Linq
Sorting
Data Structures
Statistical performance of purely functional maps and sets
Data Structures
Functional Programming
Statistics
Avl Tree
Red Black-Tree
Storing 1 million phone numbers
Algorithm
Data Structures
TreeMap or HashMap?
Java
Data Structures
Designing a web crawler
Data Structures
Search Engine
Web Crawler
Google Search
Large Data-Volumes
Easiest way of using min priority queue with key update in C++
C++
Algorithm
Data Structures
Why should hash functions use a prime number modulus?
Language Agnostic
Data Structures
Hash
What is the most efficient graph data structure in Python?
Python
Performance
Data Structures
Graph Theory
Looking for C++ STL-like vector class but using stack storage
C++
Data Structures
Stl
Vector
How are Python's Built In Dictionaries Implemented?
Python
Data Structures
Dictionary
Why is it better to have 100 functions operate on one data structure than 10 functions on 10 data structure
Data Structures
Quotations
Best data structure for implementing a dictionary?
String
Algorithm
Dictionary
Data Structures
python: deque vs list performance comparison
Python
Performance
Data Structures
Benchmarking
Deque
Does PHP have built-in data structures?
Php
Data Structures
iterate vector, remove certain items as I go
C++
Data Structures
Vector
Loops
Iterator
Why increase pointer by two while finding loop in linked list, why not 3,4,5?
Algorithm
Data Structures
Linked List
Cycle
Floyd Cycle-Finding
Fastest data structure for contains() in Java?
Java
Data Structures
Set
Why is Dictionary preferred over Hashtable in C#?
C#
.Net
vb.net
Data Structures
C# Data Structure Like Dictionary But Without A Value
C#
.Net
Data Structures
Does java have a "LinkedConcurrentHashMap" data structure?
Java
Data Structures
What is the difference between tree depth and height?
Algorithm
Data Structures
Tree
Nodes
Terminology
What's a RDF triple?
Data Structures
Rdf
Xml Namespaces
N Triples
B-tree faster than AVL or RedBlack-Tree?
Algorithm
Data Structures
Binary Tree
Reverse the ordering of words in a string
Algorithm
Data Structures
String
What is the most efficient way to sort an NSSet?
Objective C
Cocoa
Data Structures
Sorting
Nsset
Linked List in SQL
Sql
Data Structures
How do you validate a binary search tree?
Algorithm
Data Structures
Binary Search-Tree
Opposite of Bloom filter?
Data Structures
Bloom Filter
Trie implementation
C++
C
Data Structures
Trie
Difference between back tracking and dynamic programming
Algorithm
Data Structures
How to keep an Javascript object/array ordered while also maintaining key lookups?
Javascript
Data Structures
Is there any graph data structure implemented for C#
C#
.Net
Data Structures
Graph Theory
What is the intuition behind the Fibonacci heap data structure?
Data Structures
Fibonacci Heap
Difference between binary tree and binary search tree
Data Structures
Tree
Binary Tree
Binary Search-Tree
What do I use for a max-heap implementation in Python?
Python
Data Structures
Heap
Recursive Datastructures
The best way to calculate the height in a binary search tree? (balancing an AVL-tree)
Algorithm
Data Structures
Binary Tree
Avl Tree
Tree Balancing
How to check deque length in Python
Python
Python 3.x
Python 2.7
Data Structures
DAG vs. tree using Git?
Git
Data Structures
How would you represent a Rubik's Cube in code?
Data Structures
Rubiks Cube
How to find nth element from the end of a singly linked list?
Algorithm
Linked List
Data Structures
ArrayList Vs LinkedList
Java
Data Structures
Collections
Arraylist
Linked List
What's an appropriate search/retrieval method for a VERY long list of strings?
C#
Performance
Data Structures
Lookup
Difference between a HashMap and a dictionary ADT
Java
Data Structures
How to make a dictionary that returns key for keys missing from the dictionary instead of raising KeyError?
Python
Dictionary
Data Structures
Dictionary Missing
Interview: Remove Loop in linked list - Java
Java
Data Structures
Linked List
Set of objects in javascript
Javascript
Object
Data Structures
Set
How to Correctly Use Lists in R?
R
List
Data Structures
Language Features
Abstract Data-Type
Haskell's algebraic data types
Data Structures
Haskell
Types
Functional Programming
Algebraic Data-Types
Why do we need Deque data structures in the real world?
Data Structures
Deque
Javascript data structures library
Algorithm
Data Structures
Javascript
Array-Based vs List-Based Stacks and Queues
Arrays
Data Structures
Stack
Queue
Linked List
what is the difference between set and unordered_set in C++?
C++
Algorithm
Data Structures
C++11
Visual C++ equivalent of GCC's __attribute__ ((__packed__))
C++
C
Visual C++
Gcc
Data Structures
What are the underlying data structures used for Redis?
Algorithm
Data Structures
Redis
What is the true difference between a dictionary and a hash table?
Python
Data Structures
Hash
Dictionary
Hashtable
Chained Hash Tables vs. Open-Addressed Hash Tables
Data Structures
Hashtable
Type-safe generic data structures in plain-old C?
C
Generics
Data Structures
Code Generation
How to create a 2 way map in java
Java
Data Structures
What is the benefit of purely functional data structure?
Data Structures
Haskell
Functional Programming
Ocaml
Purely Functional
Hash : How does it work internally?
Java
Algorithm
Data Structures
Hash
Interview question: data structure to set all values in O(1)
Data Structures
Difference between tuples and frozensets in Python
Python
Data Structures
Set
Tuples
In Python, when to use a Dictionary, List or Set?
Python
List
Dictionary
Data Structures
Set
How can CopyOnWriteArrayList be thread-safe?
Java
Data Structures
Concurrency
Java Memory-Model
What are the differences between B trees and B+ trees?
Database
Data Structures
Converting YAML file to python dict
Python
Data Structures
Dictionary
Yaml
Performance differences... so dramatic?
C#
.Net
Data Structures
Collections
Firebase data structure and url
Data Structures
Nosql
Firebase
what is "stack alignment"?
C++
Data Structures
Mingw
Visual C++
Compiler Construction
How does a sentinel node offer benefits over NULL?
C++
Algorithm
Data Structures
What is C# analog of C++ std::pair?
C#
.Net
Data Structures
Std Pair
Base Class-Library
List of all unique characters in a string?
Python
Performance
Data Structures
Is it possible to query a tree structure table in MySQL in a single query, to any depth?
Mysql
Sql
Database Design
Data Structures
Hierarchical Data
Repository pattern vs. "smart" business objects
Data Structures
Architecture
Repository Pattern
Why use SQL database?
Sql
Database
Database Design
Data Structures
How to delete in a heap data structure?
Algorithm
Data Structures
Heap
Is Minimum Spanning Tree afraid of negative weights?
Algorithm
Data Structures
Graph
Minimum Spanning-Tree