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 Hashtable{ | |
private static final int SIZE = 97; | |
private Pair[] map = null; | |
public Hashtable(){ | |
this(SIZE); | |
} | |
public Hashtable(int N){ | |
map = new Pair[N]; |
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
package com.operations.queue; | |
public class Queue{ | |
private int N ; | |
private static final int SIZE = 1024; | |
private int[] arr = null; | |
private int t = 0; | |
private int f = 0; |
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
package com.operations.stack; | |
public class Stack{ | |
private static final int SIZE = 1024; | |
private int N; | |
private int t = -1; |
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
package com.example.tree; | |
import com.example.Node; | |
// Tree is balanced when the difference between maximum and minimum height is <= 1. | |
public class Tree{ | |
public static void main(String args[]){ | |
Node root = new Node(); | |
if(checkTreeBalance(root)) | |
System.out.println("Its a balanced tree"); | |
else |
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
package com.example.triangle; | |
import java.io.File; | |
import java.io.BufferedReader; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.StringTokenizer; | |
public class Triangle { | |
public static void main(String args[]){ | |
NewerOlder