Skip to content

Instantly share code, notes, and snippets.

View JessyGreben's full-sized avatar

Jessica Grebenschikov JessyGreben

  • One Medical Group
  • San Francisco, CA
View GitHub Profile
@JessyGreben
JessyGreben / gist:30ab38a51ec11fda86b6
Created July 5, 2015 19:01
Longest Concatenated Word - ruby
require 'trie'
class LongestConcatWord
def initialize(file)
@trie = Trie.new
@word_hash = Hash.new
@original_word = nil
@file = file
@concat_words = []
@count = 0
@JessyGreben
JessyGreben / Binary Search Tree - Ruby
Last active September 25, 2020 11:14
Binary Search Tree - Ruby
class Node
attr_reader :value
attr_accessor :left, :right
def initialize(value=nil)
@value = value
left = nil;
right = nil;
end
end
@JessyGreben
JessyGreben / Binary Search Tree - Javascript
Last active August 29, 2015 14:22
Binary Search Tree - Javascript
var BinarySearchTree = function() {
this.root = null;
};
//build a tree
BinarySearchTree.prototype.insert = function(value) {
//create a node object with the data as value
var node = {
value: value,
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')