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 trees; | |
import java.util.LinkedList; | |
import java.util.Queue; | |
/** | |
* There are bugs around odd and even array length and last element being not added but this is the | |
* general structure of the code. | |
* | |
* @author amitsaurav |
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 collections; | |
import java.util.Arrays; | |
import java.util.List; | |
/** | |
* Created by amit.saurav on 11/23/16. | |
*/ | |
public class ListOfLists <T> { | |
private final List<List<T>> listOfLists; |
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.io.*; | |
import java.util.*; | |
class Palindrome { | |
public static void main(String[] args) { | |
List<String> palindromes = Arrays.asList("gabbag", "baggab"); | |
System.out.println(getShortestCover(palindromes)); | |
} | |
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
#!/bin/sh | |
year=`date +%Y` | |
month=`date +%m` | |
day=`date +%d` | |
isLeap=0 | |
if [ $((year%400)) -eq 0 ]; then | |
isLeap=1 | |
elif [ $((year%100)) -eq 0 ]; then |
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
jQuery("#transactions tbody tr").each(function() { | |
var row = jQuery(this); | |
row.find('td:last').remove(); | |
if(row.text().indexOf("CHEVRON") === -1 && row.text().indexOf("U-PARK") === -1 && row.text().indexOf("GOOD2GO") === -1) { | |
row.remove(); | |
} | |
}); | |
jQuery("#transactions tfoot").remove(); |