/twitch

Code samples from twitch.tv/fhinkel

Primary LanguageJavaScriptApache License 2.0Apache-2.0

Code samples from twitch.tv/fhinkel

Sorting

Video: https://www.youtube.com/watch?v=oZyomw_N70o

Code: max-gap.js

The Maximum Gap Problem

Given an unsorted array of numbers, find the maximum difference between the successive elements in its sorted form. Linear time (and linear space)!

Binary trees

Video: https://www.youtube.com/watch?v=vpOUP4jQqJM

Code: trees.js

  • Tree traversals: inorder, preorder, and postorder.
  • Given a binary tree in which each node element contains a number. Find the maximum possible sum from one leaf node to nother.

Substrings, Subsequences, and Generators

Video: https://www.youtube.com/watch?v=sNvHfgm1yw0&t=9s

Code: substring.js

Given a string s and an array of words, find that longest word that's a substring of s.

Leetcode, Codewars, Project Euler

Video: https://youtu.be/SiL6GmE0tTc

Random selection of problems: