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
input = new Scanner(System.in); | |
N = input.nextInt() | |
numbers=[] | |
for (i = 0; i < N; ++i) { | |
numbers << input.next() | |
} | |
int numberOfDigit(List<String> phoneNumbers) { | |
masterNode = new Node('#') |
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
input = new Scanner(System.in); | |
r = input.nextInt() | |
l = input.nextInt() | |
c = [[r],[1,r]] | |
(2..l-1).each { | |
List list = c[it - 1] | |
result = [] | |
i = 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
//https://www.hackerrank.com/challenges/hackerland-radio-transmitters/problem | |
s= new Scanner(System.in); | |
int n = s.nextInt(); | |
int portee = s.nextInt(); | |
maisons=new TreeSet<>() | |
for(int x_i=0; x_i < n; x_i++){ | |
maisons.add(s.nextInt()) | |
} | |
min = maisons.min() |
NewerOlder