This file contains 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 ReverseT9 { | |
public static void main(String x) { | |
ReverseT9 phone = new ReverseT9(); | |
System.out.println(phone.reverse_t9(x)); | |
} | |
char getCharacter(char key, int index) { | |
char[][] characterMapping = new char[][] { | |
{'+'}, |
This file contains 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.math.*; | |
import java.security.*; | |
import java.text.*; | |
import java.util.*; | |
import java.util.concurrent.*; | |
import java.util.regex.*; | |
public class CaeserCipher { |
This file contains 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
<?php | |
$currentTime = date('Y-m-d H:i:s'); | |
var_dump(strtotime($currentTime)); | |
$someDate = strtotime("2019-10-10 00:00:00"); | |
$time = time(); | |
var_dump($currentTime); | |
var_dump($someDate); | |
$diff = $someDate - strtotime($currentTime); | |
var_dump($diff); |
This file contains 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
<?php | |
$a['b']=[]; | |
$a['b']['x']="y"; | |
$a['c']=[]; | |
$a['c']['y']="z"; | |
$b=array_merge($a['b'],$a['c']); | |
print_r($b); | |
var_dump($b); |
This file contains 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.*; | |
public class FizzBuzz { | |
public static void main(String[] args) { | |
for(int i=1;i<=100;i++){ | |
if(i%3==0&&i%5==0)System.out.println("FizzBuzz"); | |
else if(i%3==0)System.out.println("Fizz"); | |
else if(i%5==0)System.out.println("Buzz"); |
This file contains 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
from itertools import permutations,combinations | |
string = raw_input() | |
text=string.split(" ")[0] | |
num=int(string.split(" ")[1]) | |
rc = list() | |
words=list(text) | |
words.sort() | |
for j in range(1,num+1): | |
pc = list(combinations(words,j)) |
This file contains 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.*; | |
import java.lang.*; | |
import java.io.*; | |
class goldbach | |
{ | |
public static void main (String[] args) | |
{ | |
Scanner scr=new Scanner(System.in); | |
int T=scr.nextInt(); | |
scr.nextLine(); |
This file contains 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.*; | |
public class collectionsortsublist | |
{ | |
public static void sortsublist() | |
{ | |
List<Integer> x=new ArrayList<Integer>(); | |
x.add(1); | |
x.add(3); | |
x.add(2); | |
x.add(24); |
This file contains 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.*; | |
import java.lang.*; | |
import java.io.*; | |
import java.math.*; | |
class bigintfactorial | |
{ | |
public static Map<BigInteger,BigInteger> nf; | |
public static void main (String[] args) | |
{ | |
Scanner scr=new Scanner(System.in); |
This file contains 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.*; | |
public class series | |
{ | |
public static void main(int n) { | |
for(int i=1;i<=n;i++){ | |
//System.out.println(operate(i)); | |
System.out.println(i+" -> "+op(i)); | |
} | |
} |
NewerOlder