Skip to content

Instantly share code, notes, and snippets.

codediodeio / longest-substring.js
Created September 4, 2017 23:13
Longest Substring JavaScript - LeetCode Solution
// Given a string, find the length of the longest substring without repeating characters.
// Examples:
// Given "abcabcbb", the answer is "abc", which the length is 3.
// Given "bbbbb", the answer is "b", with the length of 1.
// Given "pwwkew", the answer is "wke", with the length of 3. Note that the answer must be a substring, "pwke" is a subsequence and not a substring.
P1xt / all-time.component.html
Created March 14, 2017 02:55
Angular 2 *ngFor loop illustrating looping through an array of objects to populate an html table
<section class="leader-table">
<h2>All Time Leaderboard</h2>
<table class="table-hover table-striped">
<th colspan="2">Camper</th>
<th>Points in past 30 days</th>
<th>All time Points</th>
kavitshah8 / 2-D-array-fix-2.js
Last active March 17, 2020 10:57
Arrays with one Misc
function createAndInitialize2DArray(size) {
// catch a bug & fix me!
var defaultValue = 0;
var twoDimensionalArray = [];
function initOneDArray() {
var row = [];
for (var i = 0; i < size; i++) {