Skip to content

Instantly share code, notes, and snippets.

View johirbuet's full-sized avatar
🎯
Focusing

Md Johirul Islam johirbuet

🎯
Focusing
  • Lowe's
  • Mooresville, NC
View GitHub Profile
// Given an array of integers, remove all of the duplicates
int[] deDup(int[] a) {
Set<Integer> set = new LinkedHashSet<>();
for(int x : a) {
set.add(x);
}
int [] ret = new int[set.size()];
int i =0;
for(int x : set) {
function makeGrid() {
console.log("makeGrid is running!")
// Select size input
let canvas, cell, gridHeight, gridWidth, rows;
canvas = $('#pixelCanvas');
gridHeight = $('#inputHeight').val();
gridWidth = $('#inputWidth').val();
body {
text-align: center;
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
h2 {
margin: 1em 0 0.25em;
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<body background="http://res.cloudinary.com/dxuvuvh7s/image/upload/v1526680568/abstract-art-artistic-459799.jpg"
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Monoton">
<link rel="stylesheet" href="styles.css">
<script src="http://res.cloudinary.com/dxuvuvh7s/image/upload/v1524020589/Pixel_Art_Maker_4.png"></script>
<meta charset="UTF-8">
</head>
<body>
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.Stack;
public class UVA127 {
public static void main(String[] args) throws IOException {
BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Scanner;
public class UVA11804 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = Integer.parseInt(sc.nextLine());
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for(int t = 1; t <= T; t++) {
int N = sc.nextInt();
int [] A = new int[N];
int [] B = new int[N];
import java.util.Scanner;
public class UVA11608 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int c = 1;
while(sc.hasNextInt()) {
int p = sc.nextInt();
if( p == -1) {
break;
import java.util.Scanner;
public class UVA12918 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
while(T-->0) {
int n = sc.nextInt();
int m = sc.nextInt();
int extra = m - n;
import java.util.Scanner;
public class UVA12996 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for(int t =1;t<=T;t++) {
int N = sc.nextInt();
int L = sc.nextInt();
int [] M = new int[N];