Bro buhut achi videos banate ho ap literally best explanation of Question with example and everything like if i stuck at any point while doing leetcode i just watch your explanation part and code it by myself, itni acha smjh ata like coding wala part tk jana hi ni prta.
Although i don't do leetcode daily nowadays, I wanted to thank you bhaiya for your videos. Your solution videos helped me during my 7th sem placement season and because of that I cracked flipkart sde intern🛐🛐 few days back along with 3 other companies.
Here we divided into groups and made sure that group is sorted in main array There are chances multiple answer are possible bcoz ther could be lexicographic smaller array with different elements If question was not lexicographic but minimum possible array then this won't work bcoz once first swapping is done it is possible after swap element which is at other place could be smaller in some other group ?
I have solved it using a QUEUE : int n=nums.length; int sorted[] = Arrays.copyOfRange(nums,0,n); Arrays.sort(sorted); //grouping and put each element to map with their group List list = new ArrayList(); Map map = new HashMap(); list.add(new LinkedList(List.of(sorted[0]))); map.put(sorted[0], 0); for(int i=1; i
like target for this video is 170. Please do like if you have understood the explanation as well as the code😄😄
16:40 what a line very amazing explanation best
nice explanation bhayya. i think you are channel is underated
Awesome Explanation🔥🔥..Question was tricky
Bro buhut achi videos banate ho ap literally best explanation of Question with example and everything like if i stuck at any point while doing leetcode i just watch your explanation part and code it by myself, itni acha smjh ata like coding wala part tk jana hi ni prta.
♥️♥️🙌
Although i don't do leetcode daily nowadays, I wanted to thank you bhaiya for your videos. Your solution videos helped me during my 7th sem placement season and because of that I cracked flipkart sde intern🛐🛐 few days back along with 3 other companies.
@@ayushraj1268 shabash congratulations 🎊 👏 and best of luck ❤️
bhaiya contests reviews bhi kardo na start please 🥺
Can we solve this problem by using deque push the indices and use while pop back if limit condition is satisfied by num[dq.back()]-nums[i]
i used List instead of ArrayList and it gave TLE, such a small diff can give tle
Here we divided into groups and made sure that group is sorted in main array
There are chances multiple answer are possible bcoz ther could be lexicographic smaller array with different elements
If question was not lexicographic but minimum possible array then this won't work bcoz once first swapping is done it is possible after swap element which is at other place could be smaller in some other group ?
❤❤
9/11 ke beech ka difference 2 hain ☠...thank you for the video bhai
2 towers ✈️
Bhaiya code ko skip krke baki sab samj 😅 aya
i make the 150th like
I have solved it using a QUEUE :
int n=nums.length;
int sorted[] = Arrays.copyOfRange(nums,0,n);
Arrays.sort(sorted);
//grouping and put each element to map with their group
List list = new ArrayList();
Map map = new HashMap();
list.add(new LinkedList(List.of(sorted[0])));
map.put(sorted[0], 0);
for(int i=1; i