Skip to content

Instantly share code, notes, and snippets.

View shuboy2014's full-sized avatar
🎯
Focusing

Shubham Aggarwal shuboy2014

🎯
Focusing
View GitHub Profile
@shuboy2014
shuboy2014 / minimumWindowString.js
Created March 10, 2020 14:53
Interviewbit Window String
module.exports = {
minWindow : function(A, B){
const map = {};
let missing = B.length;
let fast=0, slow=0;
let shortest = [0,Infinity];
for(let i=0;i<B.length;i++){
if(B[i] in map){
map[B[i]].cnt += 1;