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 sample.code.com; | |
/** | |
* @author farmbytes | |
*/ | |
import java.util.Arrays; | |
import java.util.Random; | |
public class KthLargestElementInArray { |
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 sample.code.com; | |
/** | |
* Integer to ASCII | |
* @author farmbytes | |
* | |
*/ | |
public class ItoaImpl { | |
private static final String itoa (int num, int base){ |
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 sample.code.com; | |
public class StackUsingLinkedList { | |
private static class Node { | |
int num; | |
Node next; | |
Node(int num){ | |
this.num = num; |
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 com.strings; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class LongestSubstring { | |
public int findLongestSubstringOf2Chars(String input) { | |
Map<Character, Integer> map = new HashMap<Character, Integer>(); | |
int curr_start = 0, curr_window_size = 1; |