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 main | |
| import ( | |
| "os" | |
| "fmt" | |
| "io/ioutil" | |
| "strings" | |
| ) | |
| func main() { | |
| if (len(os.Args) > 1) { |
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 main | |
| import ( | |
| "fmt" | |
| ) | |
| func generate() chan int { | |
| ch := make(chan int) | |
| go func() { | |
| for i := 2; ;i++ { |
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 main | |
| import ( | |
| "fmt" | |
| ) | |
| var pongChan = make(chan string,1) | |
| var pingChan = make(chan string,1) | |
| var state = make(chan int) | |
| func ping(){ |
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
| public class PascalTriangle { | |
| public static long fact(long n) { | |
| if (n == 0) | |
| return 1; | |
| if (n == 1) | |
| return 1; | |
| long f = 1; | |
| for (long i = 2; i <= n; i++) { | |
| f *= i; | |
| } |
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
| public class TowerOfHanoi { | |
| // move from left to right | |
| public static void move(int disk,String srcTower,String tempTower, String dstTower) { | |
| if (disk == 1) { | |
| System.out.println("Move top disk from " + srcTower + " to " + dstTower); | |
| } else { | |
| move(disk-1,srcTower,dstTower,tempTower); | |
| move(1,srcTower,tempTower,dstTower); | |
| move(disk-1,tempTower,srcTower,dstTower); | |
| } |
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
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| int check1(char *s) { | |
| return strlen(s) == 1; | |
| } | |
| int check2(char *s) { | |
| char *p = s; |
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 Main; | |
| import java.util.HashMap; | |
| import java.util.HashSet; | |
| import java.util.Map; | |
| import java.util.Scanner; | |
| public class FatMouseDict { | |
| /** |
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 main; | |
| import java.util.Collections; | |
| import java.util.HashMap; | |
| import java.util.LinkedList; | |
| import java.util.List; | |
| import java.util.Map; | |
| import java.util.Scanner; | |
| public class WordSort { |
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 main; | |
| import java.util.LinkedList; | |
| import java.util.List; | |
| import java.util.Scanner; | |
| public class Doublets { | |
| public static boolean track(Object [] dict,List<String> output, int begin, int end) { | |
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
| h1 { | |
| font-size: 2em; | |
| font-weight: bold; | |
| color: #777777; | |
| margin: 40px 0px 70px; | |
| text-align: center; | |
| } | |
| .sendButton { | |
| display: block; |