Skip to content

Instantly share code, notes, and snippets.

class MinHeap {
constructor () {
/* Initialing the array heap and adding a dummy element at index 0 */
this.heap = [null]
}
getMin () {
/* Accessing the min element at index 1 in the heap array */
return this.heap[1]
}
@zero-t4
zero-t4 / safe-ui-colors-from-a.lebedev.js
Created August 28, 2019 19:22
Safe colors table for UI
export const safeColors = [
"FFFFCC",
"FFFF99",
"FFFF66",
"FFFF33",
"FFFF00",
"CCCC00",
"FFCC66",
"FFCC00",
"FFCC33",
<div id="lamp">
<input type="radio" name="switch" value="on" />
<input type="radio" name="switch" value="off" checked="checked"/>
<label for="switch" class="entypo-lamp"></label>
<div class="lamp">
<div class="gonna-give-light"></div>
</div>
</div>