This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var messageBus = { | |
//What is the realtionship between subscrib and publish? | |
subscriberCallbacks: {}, | |
subscribe: function(title, callback) { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Definition for a binary tree node. | |
* function TreeNode(val) { | |
* this.val = val; | |
* this.left = this.right = null; | |
* } | |
*/ | |
/** | |
* @param {TreeNode} root | |
* @param {number} k |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CashAmount { | |
constructor(amount) { | |
this.amount = amount; | |
this.COINS = [ ['hundreds', 100], ['fifties', 50],['twenties', 20], ['tens', 10], | |
['fives', 5], | |
['ones', 1], | |
['quarters', 0.25], | |
['dimes', 0.10], | |
['nickels', 0.05], | |
['pennies', 0.01] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var LinkedList = function(value) { | |
this.value = value; | |
this.next = null; | |
} | |
//REturns a unique linked list based on the argument | |
function uniqueLinkedList(link_list) { | |
var uniqueValues = []; |