Skip to content

Instantly share code, notes, and snippets.

View biancadanforth's full-sized avatar

Bianca Danforth biancadanforth

View GitHub Profile
@biancadanforth
biancadanforth / Algorithms Coursera Part II Programming Assignment 1.js
Last active July 13, 2023 04:30
Algorithms Coursera Part II Programming Assignment 1.js
/* eslint-env node */
/**
* The file contains the edges of a directed graph. Vertices are labeled
* as positive integers from 1 to 875714. Every row indicates an edge,
* the vertex label in first column is the tail and the vertex label in
* second column is the head (recall the graph is directed, and the edges
* are directed from the first column vertex to the second column vertex).
* So for example, the 11th row looks like: "2 47646". This just means
* that the vertex with label 2 has an outgoing edge to the vertex with
* label 47646
@biancadanforth
biancadanforth / Algorithms Coursera Part II Programming Assignment 2.js
Last active February 10, 2019 04:20
Algorithms Coursera Part II Programming Assignment 2.js
/* eslint-env node */
/**
* The file contains an adjacency list representation of an undirected weighted
* graph with 200 vertices labeled 1 to 200. Each row consists of the node
* tuples that are adjacent to that particular vertex along with the length of
* that edge. For example, the 6th row has 6 as the first entry indicating that
* this row corresponds to the vertex labeled 6. The next entry of this row
* "141,8200" indicates that there is an edge between vertex 6 and vertex 141
* that has length 8200. The rest of the pairs of this row indicate the other
@biancadanforth
biancadanforth / Algorithms Coursera Part II Programming Assignment 3.js
Last active February 17, 2019 22:15
Algorithms Coursera Part II Programming Assignment 3.js
/* eslint-env node */
/**
* The goal of this problem is to implement the "Median Maintenance" algorithm
* (covered in the Week 3 lecture on heap applications). The text file contains
* a list of the integers from 1 to 10000 in unsorted order; you should treat
* this as a stream of numbers, arriving one by one. Letting x_i denote the ith
* number of the file, the kth median m_k is defined as the median of the
* numbers x_1, ...,x_k (So, if k is odd, then m_k is ((k+1)/2)th smallest number
* among x_1, ... ,x_k; if k is even, then m_k is the (k/2)th smallest number
@biancadanforth
biancadanforth / Algorithms Coursera Part II Programming Assignment 4.js
Last active February 7, 2023 19:08
Algorithms Coursera Part II Programming Assignment 4.js
/* eslint-env node */
/**
* The goal of this problem is to implement a variant of the 2-SUM algorithm
* covered in this week's lectures.
*
* The file contains 1 million integers, both positive and negative (there
* might be some repetitions!).This is your array of integers, with the ith
* row of the file specifying the ith entry of the array.
*
@biancadanforth
biancadanforth / Algorithms Coursera Part III Programming Assignment 1 Part 1 and 2.js
Last active March 3, 2019 00:14
Algorithms Coursera Part III Programming Assignment 1.js
/* eslint-env node */
/**
* -------------------------- Part 1 -----------------------------
*/
/**
* In this programming problem and the next you'll code up the greedy algorithms
* from lecture for minimizing the weighted sum of completion times.
*
diff --git a/devtools/client/locales/en-US/storage.properties b/devtools/client/locales/en-US/storage.properties
--- a/devtools/client/locales/en-US/storage.properties
+++ b/devtools/client/locales/en-US/storage.properties
@@ -31,6 +31,9 @@ tree.labels.localStorage=Local Storage
tree.labels.sessionStorage=Session Storage
tree.labels.indexedDB=Indexed DB
tree.labels.Cache=Cache Storage
+# TODO: Figure out how to structure tree for the 3 different types of extension
+# storage (browser.storage.local, .managed, .sync).
+tree.labels.extensionStorage=Extension Storage
@biancadanforth
biancadanforth / Algorithms Coursera Part III Programming Assignment 2 Part 1.js
Last active March 18, 2019 17:32
Algorithms Coursera Part III Programming Assignment 2.js
/* eslint-env node */
/* eslint-disable object-property-newline */
/**
* -------------------------- Part 1 -----------------------------
*/
/**
* In this programming problem and the next you'll code up the clustering
* algorithm from lecture for computing a max-spacing k-clustering.
@biancadanforth
biancadanforth / Algorithms_Coursera_Part_III_Programming_Assignment_3_Part_3.js
Last active March 16, 2019 21:06
Algorithms_Coursera_Part_III_Programming_Assignment_3_Parts_1_and_2.js
/* eslint-env node */
/**
* -------------------------- Part 3 -----------------------------
*/
/**
* In this programming problem you'll code up the dynamic programming
* algorithm for computing a maximum-weight independent set of a path graph.
*
@biancadanforth
biancadanforth / knapsack1.txt
Last active March 26, 2019 19:15
Algorithms_Coursera_Part_III_Programming_Assignment_4
10000 100
16808 250
50074 659
8931 273
27545 879
77924 710
64441 166
84493 43
7988 504
82328 730
@biancadanforth
biancadanforth / Algorithms_Coursera_Part IV_Programming_Assignment_1.js
Last active May 4, 2019 20:00
Algorithms_Coursera_Part IV_Programming_Assignment_1
/* eslint-env node */
/**
* -------------------------- Part 1 -----------------------------
*/
/**
* In this assignment you will implement one or more algorithms for the all-pairs
* shortest-path problem. Here are data files describing three graphs:
*