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
hello;there;senor | |
how | |
are | |
you;today |
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
//GLOBALS | |
ArrayList<String> alphabet; //all the characters for this a language | |
ArrayList<Vertex> graph; //set of all vertices containing edge relationships and cost requirments for traversal | |
private final String START = "S"; //file format quantifier for a START (initial) vertex | |
private final String END = "F"; //file format quantifier for a END (termination) vertex | |
//business method - decides whether a given word can reach a TERMINAL state in a TM (graph). | |
public boolean CheckWordAgainstGraph(String word) |
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/python | |
# Run with: | |
# python hello.py cameron | |
# python hello.py | |
# import modules used here -- sys is a very standard one | |
import sys |
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 "merge.h" | |
//top down merge sort | |
void MergeSort(int A[], int arraySize) | |
{ | |
int B[arraySize]; //temp workspace | |
Split(A, 0, arraySize, B); | |
} | |
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 "insert.h" | |
void InsertionSort(int *list, int listLength) | |
{ | |
int i, j, temp; | |
for( i = 0 ; i < listLength ; ++i ) | |
{ | |
temp = list[i]; // store the next element to sort |
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
//Example opening and parsing a *.txt file | |
// | |
//COMPILING: "gcc -g FileManipulation.c -o fm" | |
//RUNNING: "/.fm abc.txt" | |
#include "FileManipulation.h" | |
int main(int argc, char **argv) | |
{ | |
//choose some filename and openmode |