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.Stack; | |
public class Main { | |
static int decider; | |
static char checker; | |
static Node root = null; | |
public static void main(String[] args) { |
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 LinkedList { | |
static Node root; | |
static Node current; | |
static Node temp; | |
public void addNode(int data){ | |
Node node = new Node(data); | |
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> | |
#include <cstring> | |
using namespace std; | |
char* getSubstring(char c[], int starting, int ending){ | |
int length = ending - starting + 1; | |
int temp = length; | |
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.ArrayList; | |
public class Main { | |
static Node node; | |
static Node newRoot; | |
static String codedString = ""; | |
public static void main(String[] args) { |
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 Main { | |
static int[][] P; | |
static final int N = 4; | |
public static void main(String[] args) { | |
int[][] M = { { 0, 5, 999, 999 }, { 50, 0, 15, 5 }, { 30, 999, 0, 15 }, | |
{ 15, 999, 5, 0 } }; | |
P = new int[N][N]; | |
System.out.println("Matrix to find the shortest path 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
public class HeapSort { | |
public static final int max = 11; | |
public static void main(String[] args){ | |
int[] toSortArray = new int[max]; | |
//Required Things | |
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 random | |
class Node: | |
def __init__(self, key): | |
self.key = key | |
self.right = None | |
self.left = None | |
self.height = 1 | |
def rotateRight(y): |
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 <stdio.h> | |
#include <stdlib.h> | |
typedef struct Node * nodePtr; | |
struct Node{ | |
int data; | |
nodePtr next; |
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 RadixSort { | |
public static final int max = 10; | |
private static int infinity = 99999; | |
public static void main(String[] args){ | |
int[] toSortArray = new int[max]; | |
//Required Things |
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.Scanner; | |
public class kruskal{ | |
public static void main(String[] args){ | |
Scanner scan = new Scanner(System.in); | |
int[][] matrix = new int[5][5]; | |
int[] parent = new int[5]; | |
int min; |