Added 10 solutions
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
import java.util.Scanner;
|
||||
|
||||
public class Solution {
|
||||
public static void main(String [] args) {
|
||||
public static void main(String[] args) {
|
||||
Scanner scan = new Scanner(System.in);
|
||||
int arr[][] = new int[6][6];
|
||||
for (int row = 0; row < 6; row++) {
|
||||
|
||||
@@ -26,7 +26,7 @@ class Player {
|
||||
}
|
||||
|
||||
class Solution {
|
||||
public static void main(String [] args) {
|
||||
public static void main(String[] args) {
|
||||
Scanner scan = new Scanner(System.in);
|
||||
int n = scan.nextInt();
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.HashMap;
|
||||
// Space Complexity: O(n)
|
||||
|
||||
public class test {
|
||||
public static void main(String [] args) {
|
||||
public static void main(String[] args) {
|
||||
HashMap<Integer, Integer> map = new HashMap<>();
|
||||
ArrayDeque<Integer> deque = new ArrayDeque<>();
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.HashMap;
|
||||
/* BufferedReader is used instead of Scanner since it's faster and
|
||||
won't time out on HackerRank test cases when using Java8 */
|
||||
class Solution {
|
||||
public static void main(String [] args) throws IOException {
|
||||
public static void main(String[] args) throws IOException {
|
||||
/* Save input as entries in a HashMap */
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
|
||||
int n = Integer.parseInt(br.readLine());
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ class MotorCycle extends BiCycle {
|
||||
}
|
||||
|
||||
class Solution {
|
||||
public static void main(String [] args) {
|
||||
public static void main(String[] args) {
|
||||
MotorCycle M = new MotorCycle();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ class Soccer extends Sports {
|
||||
}
|
||||
|
||||
public class Solution {
|
||||
public static void main(String [] args) {
|
||||
public static void main(String[] args) {
|
||||
Sports c1 = new Sports();
|
||||
Soccer c2 = new Soccer();
|
||||
System.out.println(c1.getName());
|
||||
|
||||
@@ -10,7 +10,8 @@ import java.util.regex.PatternSyntaxException;
|
||||
public class Solution {
|
||||
public static void main(String[] args) {
|
||||
Scanner scan = new Scanner(System.in);
|
||||
int testCases = Integer.parseInt(scan.nextLine());
|
||||
int testCases = scan.nextInt();
|
||||
scan.nextLine(); // gets rid of the pesky newline.
|
||||
while (testCases-- > 0) {
|
||||
String pattern = scan.nextLine();
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user