Skip to content

Instantly share code, notes, and snippets.

View parthamk's full-sized avatar
🎯
Focusing

Partha Mallick parthamk

🎯
Focusing
View GitHub Profile
import java.io.*; // for handling input/output
import java.util.*; // contains Collections framework
// don't change the name of this class
// you can add inner classes if needed
class Main{
public static void main(String[] args){
String[] code ={".-","-...","-.-.","-..",".","..-.","--.","....","..",
".---","-.-",".-..","--","-.","---",".--.","--.-",
".-.","...","-","..-","...-",".--","-..-","-.--",
import java.io.*; // for handling input/output
import java.util.*; // contains Collections framework
// don't change the name of this class
// you can add inner classes if needed
class Main {
public static void main (String[] args) {
// Your code here
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
import java.io.*; // for handling input/output
import java.util.*; // contains Collections framework
// don't change the name of this class
// you can add inner classes if needed
class Main {
public static void main (String[] args) {
// Your code here
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
import java.io.*; // for handling input/output
import java.util.*; // contains Collections framework
// don't change the name of this class
// you can add inner classes if needed
class Main {
public static void main (String[] args) {
// Your code here
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
import java.io.*; // for handling input/output
import java.util.*; // contains Collections framework
// don't change the name of this class
// you can add inner classes if needed
class Main {
public static void main (String[] args) {
// Your code here
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
import java.io.*; // for handling input/output
import java.util.*; // contains Collections framework
// don't change the name of this class
// you can add inner classes if needed
class Main {
public static void main (String[] args) {
// Your code here
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
import java.io.*; // for handling input/output
import java.util.*; // contains Collections framework
import java.util.Map.Entry;
// don't change the name of this class
// you can add inner classes if needed
class Main {
public static void main (String[] args) {
// Your code here
Scanner sc = new Scanner(System.in);
String s = sc.next();
function makeCar(name, wheelCount) {
const car = {
name: name,
type: "Car",
wheelCount:wheelCount ,
__proto__:vehicle
}
return car;
Array.prototype.contains = function(val){ return this.some(string =>JSON.stringify(string) === JSON.stringify(val));}
Array.prototype.includesOneof = function(array){ for(let i=0;i<array.length;i++){ if(this.contains(array[i])){ return true; } } return false; }
@parthamk
parthamk / Main.java
Created October 13, 2022 19:05
Given an m x n matrix, return all elements of the matrix in spiral order.
// Given an m x n matrix, return all elements of the matrix in spiral order.
//
// Input: matrix = [[1,2,3],[4,5,6],[7,8,9]]
//
// Given an m x n matrix, return all elements of the matrix in spiral order.
//
// Input: matrix = [[1,2,3],[4,5,6],[7,8,9]]
//
// 1 2 3
//