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.*; | |
import java.text.*; | |
import java.math.*; | |
import java.util.regex.*; | |
public class Solution { | |
public static int factorial(int n)//factorial method | |
{ | |
if (n == 0) |
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
//Day8 | |
import java.util.*; | |
import java.io.*; | |
class Solution{ | |
public static void main(String []argh) | |
{ | |
Map<String,Long> phonebook = new java.util.HashMap<>(); | |
Scanner in = new Scanner(System.in); | |
int n = in.nextInt(); |
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.util.Scanner; | |
public class Day6{ | |
public static void main(String[] args){ | |
Scanner input = new Scanner(System.in); | |
int n = input.nextInt(); | |
input.nextLine(); | |
String[] words = new String[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.util.Scanner; | |
public class Reverse{ | |
public static void main(String[] args) { | |
Scanner input = new Scanner(System.in); | |
// System.out.println("Enter the size of the array"); | |
int n = input.nextInt(); | |
int[] arr = new int[n]; | |
// System.out.println("Enter array values"); | |
for(int i=0; i<n; i++){ |
NewerOlder