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
package tree; | |
/* | |
50 | |
/\ | |
40 60 | |
/\ /\ | |
30 45 55 70 | |
/\ | |
52 58 |
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
package tree; | |
import java.util.LinkedList; | |
import java.util.Queue; | |
public class PrintNodesOfLastLevelOfBinaryTree { | |
private Node rootNode; | |
public static void main(String[] args) { |
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
package tree; | |
import java.util.LinkedList; | |
import java.util.Queue; | |
import java.util.Stack; | |
/* | |
50 | |
/\ | |
40 60 |
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
package tree; | |
/* | |
50 | |
/\ | |
40 60 | |
/\ /\ | |
30 45 55 70 | |
/\ | |
20 35 | |
*/ |
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
package tree; | |
/* | |
50 | |
/\ | |
40 60 | |
/\ /\ | |
30 45 55 70 | |
/\ | |
20 35 |
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
package miscellaneous; | |
public class TrieDictionary { | |
private TrieNode rootNode = new TrieNode('\0', false); | |
public static void main(String[] args) { | |
new TrieDictionary(); | |
} | |
public TrieDictionary() { |
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
package miscellaneous; | |
import java.util.LinkedHashMap; | |
import java.util.Map; | |
public class IntegerToRomanNumber { | |
public static void main(String[] args) { | |
new IntegerToRomanNumber(); |
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
package sorting; | |
public class QuickSort { | |
public static void main(String[] args) { | |
new QuickSort(); | |
} | |
public QuickSort() { | |
int[] arr=new int[]{6,1,4,2,3}; |
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
package sorting; | |
public class MergeSort { | |
public static void main(String[] args) { | |
new MergeSort(); | |
} | |
public MergeSort() { | |
int[] arr=new int[]{6,1,4,2,3,5,10,2,2,1,6}; |
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
package sorting; | |
public class SelectionSort { | |
public static void main(String[] args) { | |
new SelectionSort(); | |
} | |
public SelectionSort() { | |
int[] arr=new int[]{1,4,3,2,1}; | |
NewerOlder