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
import java.util.*; | |
public class CoinProblem | |
{ | |
LinkedList helper = new LinkedList(); | |
static int midway = 0; | |
static BinaryTree tree = new BinaryTree(); |
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
public class BinaryNode { | |
int data; | |
BinaryNode left, right; | |
BinaryNode(int d) { | |
data = d; | |
left = right = null; | |
} | |
} |
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
public class BinaryNode { | |
int data; | |
BinaryNode left, right; | |
BinaryNode(int d) { | |
data = d; | |
left = right = null; | |
} | |
} |
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
public class BinaryTree | |
{ | |
// Root of Binary Tree | |
BinaryNode root; | |
// Constructors | |
public BinaryTree(int key) | |
{ | |
root = new BinaryNode(key); |
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
import java.util.*; | |
public class Activities | |
{ | |
public Activities() | |
{ | |
int[] start = {1,3,0,5,8,5}; |
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
import java.util.*; | |
public class Huffman { | |
static String charCode; | |
public static void main(String[] args) { | |
String text = "ABA11$A"; | |
System.out.println("string: " + text); |
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
public class BinaryTree | |
{ | |
// Root of Binary Tree | |
BinaryNode root; | |
// Constructors | |
public BinaryTree(int key) | |
{ | |
root = new BinaryNode(key); |
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
public class BinaryNode { | |
String character; | |
int data; | |
BinaryNode left, right; | |
BinaryNode(int d) { | |
data = d; | |
left = right = null; | |
} |
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
public class ArrayList { | |
int[] arrList; | |
int size; | |
public ArrayList () { | |
size = 0; | |
arrList = new int[0]; | |
} |
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
public class SampleRunner | |
{ | |
public SampleRunner() | |
{ | |
ArrayList test = new ArrayList(); | |
test.add(1);test.add(2);test.add(3);test.add(4);test.add(5); | |
test.add(0,10); |