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.interviewstreet.puzzles; | |
| import java.util.ArrayList; | |
| import java.util.Scanner; | |
| /** | |
| * | |
| * @author cypronmaya | |
| */ | |
| class Point { |
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
| def solve(str) | |
| ary = str.split("") | |
| len = ary.length | |
| total = 0 | |
| for i in 1..(len-1) | |
| count = 0 | |
| for j in i..(len-1) | |
| if ary[j - i] != ary[j] then | |
| break | |
| 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
| package com.interviewstreet.puzzles; | |
| import java.util.Scanner; | |
| public class Solution { | |
| public static void main(String[] args) { | |
| Scanner scanner; | |
| Solution sr = new Solution(); | |
| scanner = new Scanner(System.in); | |
| int no_cases = scanner.nextInt(); | |
| for (int i = 0; i < no_cases; 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 com.gild.puzzles; | |
| import java.io.File; | |
| import java.io.FileNotFoundException; | |
| import java.io.FileReader; | |
| import java.util.Scanner; | |
| public class Fightsopa { | |
| public void process(String input,int n) |
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.File; | |
| import java.io.FileNotFoundException; | |
| import java.io.FileReader; | |
| import java.util.Comparator; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| import java.util.Scanner; | |
| import java.util.TreeMap; | |
| class Topfive { |
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 interviewstreet; | |
| import java.util.Arrays; | |
| import java.util.Scanner; | |
| public class Solution { | |
| int min=1; | |
| int val=1; | |
| public static void main(String[] args) { |
NewerOlder