Skip to content

Instantly share code, notes, and snippets.

View rubenhak's full-sized avatar
🚀
Building intelligent cloud robots

Ruben Hakopian rubenhak

🚀
Building intelligent cloud robots
View GitHub Profile
{
"meta": {
"theme": "onepage"
},
"basics": {
"name": "Ruben Hakopian",
"label": "Web Developer",
"image": "https://avatars0.githubusercontent.com/u/416209?s=460&u=38f220a2c9c658141804f881c334c594eb1642ac&v=4",
"summary": "I’m a full stack web developer who can build apps from the ground up. I've worked mostly at startups so I am use to wearing many hats. I am a very product focussed developer who priotizes user feedback first and foremost. I'm generally very flexible when investigating new roles. ",
"website": "https://lordajax.com",
class Node
{
constructor(val)
{
this.value = val;
this.children = new Map();
}
insert(str)
{
@rubenhak
rubenhak / ! JavaScript Disjoint Set Union.js
Created January 13, 2023 22:10
JavaScript Disjoint Set Union
class DisjointSetUnion
{
constructor()
{
this.map = new Map();
}
find(x)
{
let other = this.map.has(x) ? this.map.get(x) : x;

TypeScript Tree Traversal

  • Tree Node
  • traverseTreeInOrder
  • traverseTreePostOrder
  • traverseTreePreOrder
  • depthFirstSearch

JavaScript Tree Traversal

  • Tree Node
  • traverseTreeInOrder
  • traverseTreePostOrder
  • traverseTreePreOrder
  • depthFirstSearch

Typescript Data Structures

  • GenericHeap
  • MinHeap
  • MaxHeap
  • PriorityQueue

JavaScript Binary Search

  • binarySearch
    • arr: the sorted array
    • target: item to find
  • binarySearchFindFirst
    • arr: the sorted array
    • target: item to find
  • binarySearchFindFirstBy
  • arr: the sorted array

JavaScript Heap & Priority Queue

  • GenericHeap
  • MinHeap
  • MaxHeap
  • PriorityQueue