Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯

Abhiroj Panwar panwarab

🎯
  • Adobe Systems
  • Noida, Uttar Pradesh
View GitHub Profile
@panwarab
panwarab / download-vs-code-server.sh
Created Dec 20, 2021 — forked from b01/download-vs-code-server.sh
Linux script to download latest VS Code Server, good for Docker (tested in Alpine).
View download-vs-code-server.sh
#!/bin/sh
set -e
# You can get the latest commit SHA by looking at the latest tagged commit here: https://github.com/microsoft/vscode/releases
commit_sha="08a217c4d27a02a5bcde898fd7981bda5b49391b"
archive="vscode-server-linux-x64.tar.gz"
owner='microsoft'
repo='vscode'
# Auto-Get the latest commit sha via command line.
View houserobber3.cpp
#include "code.h"
#include "treenode.h"
class Solution {
private:
map<long, int> memo;
long left(long i) { return 2 * i + 1; }
long right(long i) { return 2 * i + 2; }
@panwarab
panwarab / perfcal.js
Created Jul 1, 2019
Leetcode - per page performance calculator
View perfcal.js
const ppc=function(){
var total_problems=window.document.getElementsByClassName("reactable-data");
var i;
var sum=0;
var total=total_problems[0].childNodes.length;
for (i=0;i<total;i++){
var row=total_problems[0].childNodes[i];
var td=row.childNodes[0];
var attribute=td.getAttribute("value");
if(attribute==="ac"){
View OverrideOnLocalVar
package core.src.thread;
import java.util.Arrays;
public class Thread {
public static void main(String[] args) {
A a=new A();
new java.lang.Thread(new RunA(a)).start();
new java.lang.Thread(new RunB(a)).start();
View LCM Printer.java
import java.util.Scanner;
public class LCM {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
int b=sc.nextInt();
int hcf=gcd(a,b);
int lcm=(a*b)/hcf;
View gist:3e18c92656e6c4a08686a86fa9b20839
package strings;
/*
import java.util.*;
class Distinct {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
boolean[] duplicates = new boolean[128];
String str = sc.nextLine();
View Distinct.java
package strings;
import java.util.*;
class Distinct {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
boolean[] duplicates = new boolean[128];
String str = sc.nextLine();
String res = "";
View StackImplementationOnParenthesisChecker
package strings;
import java.util.Scanner;
class StackNode {
private String expression;
private StackNode below;
public StackNode getBelow() {
return below;
@panwarab
panwarab / LinkedList.java
Created Sep 14, 2018
linked list implementation in java
View LinkedList.java
import java.util.Scanner;
class ListNode {
private int value;
private ListNode nextNode;
public ListNode() {
value = -1;
nextNode = null;
}
View xyz.java
import java.util.Collections;
import java.util.Comparator;
import java.util.LinkedList;
import java.util.Scanner;
public class icpc1 {
static class A{
int a,b,c,index;
}