This file contains hidden or 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
// | |
// main.swift | |
// topN_2 | |
// | |
// Created by Ryan Warsaw on 12/14/17. | |
// Copyright © 2017 Ryan Warsaw. All rights reserved. | |
// | |
import Foundation |
This file contains hidden or 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
#include <algorithm> | |
#include <stdexcept> | |
template <typename T> | |
class ArrayList { | |
private: | |
int size_; // the size of the LIST | |
int capacity_; // the size of the backing ARRAY | |
T *data_; // The pointer to the backing ARRAY of type T | |
const int kDefaultCapacity = 16; |
This file contains hidden or 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
#include <sstream> | |
#include <iostream> | |
#include "variable_analysis_module.h" | |
// TODO: Write a comment here. | |
void VariableAnalysisModule::ParseLine(std::string line, int line_number) { | |
ArrayList<std::string> result = Split(line, ' '); | |
std::string output; | |
// This would follow the format of a variable being defined as: "const <type> <name>;" |
This file contains hidden or 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
template<typename T> | |
void ShellSortFibonacci(vector<T> &list) { | |
vector<int> gap_sequence; | |
int exponent = 2; | |
while (fibonacci(exponent) < list.size()) { | |
int result = fibonacci(exponent); | |
exponent++; | |
gap_sequence.push_back(result); | |
} |
This file contains hidden or 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
{ | |
"version": 0, | |
"weeks": [ | |
{ | |
"id": "0", | |
"title": "Week 1", | |
"topic": "Which fruits are best on a rainy day?", | |
"video": "videos/week1.mp4", | |
"questions": [ | |
{ |
This file contains hidden or 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
#include <iostream> | |
#include <fstream> | |
#include <vector> | |
#include <sstream> | |
using namespace std; | |
// TODO: Explain how this entire jumble of code works clearly and precisely. | |
vector<string> ParseWords(const string &line) { | |
vector<string> tokens; |
This file contains hidden or 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
template<typename T> | |
inline void Queue<T>::Enqueue(const T &element) { | |
if (this->data_->IsEmpty()) { | |
this->data_->AddToEnd(element); | |
} else { | |
Node<T> *node = this->data_->PeekHead(); | |
if (node->data_ != element) { | |
// Issue here when inserting something into the first node. | |
while (node->next_ != nullptr) { | |
node = node->next_; |
This file contains hidden or 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
#ifndef LINKED_LIST_LIST_H_ | |
#define LINKED_LIST_LIST_H_ | |
#include <stdexcept> | |
#include <ostream> | |
using namespace std; | |
template<class T> | |
class Node { |
This file contains hidden or 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
// TODO: Write a comment here. | |
void Dgraph::Dfs(int vertex) { | |
auto *has_been_visited = new bool[this->vertices_]; | |
// set them all to unvisited. | |
for (int index = 0; index < this->vertices_; index++) { | |
has_been_visited[index] = false; | |
} | |
has_been_visited[vertex] = true; | |
stack<int> stack; |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
[ | |
{ | |
"title": "(Test) My first MozFest session proposal in 2018", | |
"owner": { | |
"name": "Mavis Ou", | |
"organization": "Mozilla\n\n\n\n\n\n\n\n\n\n\n\n\n---" | |
}, | |
"milestone": "Decentralisation", | |
"labels": [ | |
"Localisation support requested", |