Ayush-Tibrewal / LEETCODE---Java-Solutions-

0 stars 0 forks source link

CONTEST #7

Open Ayush-Tibrewal opened 2 weeks ago

Ayush-Tibrewal commented 2 weeks ago

Leetcode contest 413 problems question 1 - given String ="123" and convert it into number then --------s.charAt(i)-'0';

question 2 -- kth samllest element with little changes so for the kth smallest element max heap is used and for the k th largest element min heap used. kth smaller element means - kth smaller at the top so remove all the larger that number so we will get top k smallest number.

Ayush-Tibrewal commented 1 week ago

image

Ayush-Tibrewal commented 1 week ago

leetcode contest - 414 first question convert into binary for(int i = 31;i>=0;i--) { int bit = (year >> i) & 1;

question 3 greedy is working but dp giving tle good question like number of permuation mein jaise recursion use ki the waise hi