Skip to content Skip to sidebar Skip to footer
Showing posts with the label Data Structures

Find Maximum Value Of Property In Object Of Objects

I have an object like this: const users = { adam: { age: 28, extraInfo: 'foobar', … Read more Find Maximum Value Of Property In Object Of Objects

Aggregate Same Key Values Into An Array And Avoid Undefined

I am trying to aggregate the same key values into an array by value. so for example I have an array… Read more Aggregate Same Key Values Into An Array And Avoid Undefined

I Need To Create A Custom Tree Data-structure Using Javascript

I looked up this basic format for a tree structure in javascript: function Tree(parent, child, data… Read more I Need To Create A Custom Tree Data-structure Using Javascript

Javascript's Equivalent Of Java's Map.getKey()

I have a map or say an associative array kind of structure in JavaScript: var myMap = {'one'… Read more Javascript's Equivalent Of Java's Map.getKey()

Finding All Connected Components Of An Undirected Graph

I have a list of objects (undirected edges) like below: pairs = [ pair:['a2', 'a5'… Read more Finding All Connected Components Of An Undirected Graph