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
#include <iostream> | |
#define B_SIZE 8 | |
using std::cout; | |
using std::cin; | |
using std::endl; | |
bool checkBounds(int currentRow, int currentCol, int horiz, int vert); | |
int move(int currentRow, int currentCol, int * newCoordinates, int step); | |
void recordMove(int row, int col); |
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
import java.util.HashSet; | |
public class IntersectingNodes { | |
HashSet<NodeCustom> hs = new HashSet<>(); | |
NodeCustom head1; | |
NodeCustom head2; | |
public IntersectingNodes(NodeCustom n1, NodeCustom n2){ | |
this.head1 = n1; | |
this.head2 = n2; |
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
//No data structures except an extra stack can be used to sort our original stack. smallest elements on top. | |
import java.util.Arrays; | |
import java.util.Stack; | |
public class SortStack<T extends Comparable> { | |
private Stack<T> main, storage; | |
private T temp; | |
public SortStack(Stack<T> s){ | |
main = s; |
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
public class CheckSubTre { | |
TreeNode<Integer> t1, t2; | |
//t2 might be subset of t1 | |
public CheckSubTre(TreeNode<Integer> t1, TreeNode<Integer> t2){ | |
this.t1 = t1;this.t2=t2; | |
} | |
public boolean check(TreeNode<Integer> t1, TreeNode<Integer> t2){ | |
if(t1 == t2){ |
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
from string import ascii_lowercase as alphabet | |
d = {"dog","dig", "din", "dag","fog", | |
"god", "fig", "ape", "dot", "got", | |
"bog", "bag","bat","cat" | |
} | |
def transform(w1, w2): | |
frontier = [[w1]] | |
explored = set() |
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
.data | |
str1: .asciiz "Enter input string: " | |
getc1: .asciiz "Enter char to replace: " | |
getc2: .asciiz "Enter char to replace with: " | |
ret1: .asciiz "Original string: " | |
ret2: .asciiz "Substitute " | |
ret3: .asciiz "Result String: " | |
arrow: .asciiz " -> " |
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
<html> | |
<head> | |
</head> | |
<body> | |
<h1>Website currently down...</h1> | |
<h2>You will be redirected to my GitHub page</h2> | |
</body> | |
</html> | |
<script> |
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
.data | |
str1: .asciiz "Enter String: " | |
#.align 2 | |
getc: .asciiz "Enter char: " | |
#.align 2 | |
ret: .asciiz "Character <ch> occurs in string <string> <n> times" | |
buffer: .space 100 #space to store our string | |
L1: .space 2 #space for our char | |
L2: .space 4 #space for our char’s frequency in string |
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
#! /usr/bin/env python2.7 | |
# Author:**** | |
# Education: **** | |
# Email: **** | |
# Phone: 808-633-**** | |
# Purpose: ZapposGiftProgram.py is my submission for Zappos' 2015 Summer | |
# Software Engineering Internship application. The program prompts the user for two | |
# inputs: the amount of money they want to spend, and how many gifts they want to purchase. | |
# The program searches through Zappos's website using its API and returns a series of |
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
import string | |
REPLACE_SPACE = None | |
def map_alphabet(): | |
alphabet = string.lowercase | |
map = dict() | |
map[" "] = REPLACE_SPACE # if spaces are found in code | |
for idx in range(0, 26): | |
map[alphabet[idx]] = idx |