Skip to content

Instantly share code, notes, and snippets.

View SanchitB23's full-sized avatar
🏠
Working from home

Sanchit Bhatnagar SanchitB23

🏠
Working from home
View GitHub Profile
@SanchitB23
SanchitB23 / main.yml
Created April 14, 2020 13:36
YAML script file to create custom Actions Workflow in GitHub to deploy and add prod keys to website
name: Deploy to GitHub Pages
on:
push:
branches:
- master
jobs:
build:
package practice.CodingQues.UnorderedQuestions;
import java.util.Scanner;
public class GandhiNumber {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
long num = scanner.nextInt();
long temp = num;
long sum = 0;
@SanchitB23
SanchitB23 / LongestCommonSubSequence.c
Created August 31, 2018 04:32
Justr shit code for understanding
//c= for value;
//b for arrow;
//Longest Common SubSequence
for(i){
for(j){
if(xi==yj){
c[i,j]=c[i-1,j-1]+1;
b=//
}
else if(c[i-1,j]>=c[i,j-1]){
@SanchitB23
SanchitB23 / renderCards.js
Created August 1, 2018 10:54
Do you understand this code?
loadItems(day) {
setTimeout(() => {
for (let i = -15; i < 85; i++) {
const time = day.timestamp + i * 24 * 60 * 60 * 1000;
const strTime = this.timeToString(time);
// console.log('time', time);
// console.log('day', day);
// console.log('strTime', strTime);
if (!this.state.items[strTime]) {
this.state.items[strTime] = [];