Skip to content

Instantly share code, notes, and snippets.

View Shivamy2's full-sized avatar
:octocat:
Always Ready!!

Shivam Yadav Shivamy2

:octocat:
Always Ready!!
  • Gla University
  • Renukoot, Sonebhadra, Uttar Pradesh, India
  • X @yshiva7052
View GitHub Profile
@Shivamy2
Shivamy2 / solution
Last active January 25, 2021 05:40
// In Java
import java.util.*;
class Question1 {
// Please try not to change anything in this method.
public static void main(String[] args) {
int[] numbers = new int[15];
addRandomNumbers(numbers);
System.out.println(Arrays.toString(numbers));
System.out.println(findPairsByList(numbers, 10));
@Shivamy2
Shivamy2 / Unique_String.java
Last active January 27, 2021 11:25
Added Java and Cpp Code
// Java Code
import java.util.HashMap;
import java.util.Map;
// Time Complexity: O(n)
// Space Complexity: O(n)
// where n = length of string
class Solution {
public static final int MAX_UNICODE = 65_535;
public static boolean checkWhetherStringIsUnique(String string) {
// Time Complexity: O(n)
// Space Complexity: O(n)
// n is the length of the string
// In JAVA
import java.util.HashMap;
import java.util.Map;
class Definition {
import java.util.LinkedList;
import java.util.List;
class Node {
int data;
Node next;
Node prev;
}
class MyDoubleLinkedList {
import serial #import serial pacakge
from time import sleep
import webbrowser #import package for opening link in browser
import sys
import requests#import system package
import http.client as http_client
http_client.HTTPConnection.debuglevel = 1
Webhost = 'http://dcs.glaitm.org:7080'
App_Key = '153eb8d5-a4eb-42d4-b2f4-d781ede74393'
ThingName = 'ECE_Geoloc'
@Shivamy2
Shivamy2 / javaTesting.java
Created April 10, 2021 09:22
List Of Videos
import java.math.BigInteger;
import java.util.*;
class YoutubeVideo {
private final long videoId;
private String name;
private BigInteger numberOfLikes;
private int duration;
public long getVideoId() {
import React, { useState, useEffect } from "react";
import Button from "./components/Button";
const getLocalItem = () => {
let list = localStorage.getItem("lists");
console.log(list);
if (list) {
return JSON.parse(list);
} else {
return [];
import React, { useState } from "react";
//import bgimg from '.';
// TODO:formik library
function Signup() {
// const [firstName, setFirstName] = useState("");
// const [lastName, setLastName] = useState("");
// const [email, setEmail] = useState("");
// const [password, setPassword] = useState("");