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 { | |
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
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
import java.net.*; | |
import java.io.*; | |
import java.util.StringTokenizer; | |
import java.util.Scanner; | |
import java.util.*; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.net.HttpURLConnection; | |
import java.net.URL; |
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
float theta; | |
void setup() { | |
size(750, 750); | |
//strokeWeight(1); | |
//noStroke(); | |
//fill(0,45); | |
} |
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.awt.Color; | |
import javax.swing.JFrame; | |
import javax.swing.JPanel; | |
import javax.swing.WindowConstants; | |
import java.awt.Dimension; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import java.awt.Point; | |
import java.awt.event.MouseListener; | |
import java.awt.event.MouseEvent; |
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 freeResponse2 | |
{ | |
public freeResponse2() | |
{ | |
String[] artists = {"Ariana Grande", "Ariana Grande", "Ariana Grande","Halsey","Halsey","Post Malone","Post Malone","Post Malone","Ariana Grande","Ariana Grande","Ariana Grande","Ariana Grande","Lady Gaga","Lady Gaga","Lady Gaga","Lady Gaga","Jonas Brothers","Jonas Brothers","Jonas Brothers","Jonas Brothers","Jonas Brothers","Jonas Brothers","Lil Nas X","Lil Nas X","Lil Nas X","Lil Nas X","Lil Nas X","Lil Nas X","Lil Nas X","Lil Nas X","Lil Nas X","Lil Nas X","Lil Nas X","Lil Nas X","Lil Nas X","Billie Eilish","Billie Eilish","Billie Eilish","Billie Eilish","Billie Eilish","Billie Eilish","Shawn Mendes","Lizzo","Lizzo","Lizzo","Lizzo","Lizzo","Lizzo","Travis Scott","Selena Gomez","Selena Gomez","Post Malone","Post Malone","Post Malone","Post Malone","The Weeknd","Mariah Carey","Mariah Carey"}; | |
LinkedList artistsList = new LinkedList(); |
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 freeResponse1 | |
{ | |
public freeResponse1() | |
{ | |
LinkedList list = new LinkedList(); | |
list.insert(list,1); | |
list.insert(list,6); | |
list.insert(list,2); |
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.awt.Color; | |
import javax.swing.JFrame; | |
import javax.swing.JPanel; | |
import javax.swing.WindowConstants; | |
import java.awt.Dimension; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import java.awt.Point; | |
import java.awt.event.MouseListener; |