First negative integer in every window of size k-(Amazon,MentorGraphics):Explanation➕ Live Coding
Вставка
- Опубліковано 8 лют 2025
- This is our 4th Video on our Sliding Window Playlist.
In this video we will try to solve a very interesting Problem : "First negative integer in every window of size k"
We will do live coding after explanation and see if we are able to pass all the test cases.
Problem Name : First negative integer in every window of size k
Company Tags : Amazon, MentorGraphics
My solutions on Github : github.com/MAZ...
GfG Link : practice.geeks...
My GitHub Repo for interview preparation : github.com/MAZ...
Subscribe to my channel : / @codestorywithmik
╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
#coding #helpajobseeker #easyrecipes
#interviewpreparation #interview_ds_algo #hinglish
This is the best explanation of the problem. I was watching Aditya Verma's playlist on Sliding window and didn't understand explanation of this problem. Searched on YT and ended up on your video. Very much clear now 🙏
same here
Jab Verma Ji bhi nai samjha paate toh in the end story sunn ne aana hi padta hai... Great explanation MIK Ji❤
same here...landed after watching aditya verma
I am not saying he's bad but uss bhai ne time waste kia bas, itni bar purane question ka reference aur kahani sunaya k context hi kho gaya k karne kya aya tha.. short simple to the point content nahi hai Aditya Verma ka
Awesome !! First time i understood sliding window concept so comfortably !
I am so glad . Thanks a lot for your precious words ❤️❤️❤️
bhai bhot alag level hai tumhara. sach me bhot kamal ka samjhaya hai
What what a solution , Superb Explanation , Combination of concise + Beautiful explanation. So so good.
yes, cool and most importantly patiently explained in detail very nice concept. 😄
bhai reach++.
Yrr apka soln kuch alag hi accha lagta hai. maine bhi code kia par utna efficient nahi tha.🔥
Thank you so much Piyush ❤️❤️❤️
@@codestorywithMIK appreciate your content bro😁😁
Amazing explanation . after watching backtracking playlist i always prefer your videos for dsa
so clear explanation.Bhaiya queue use krne se bhi hoga na?
Yes definitely
Thanks a lot ❤️😇
You are the best ❤
Explained very well !!. Tq
Thanks a lot Aman ❤️❤️❤️
thankyou sir
nice one bro
Thanks a lot Shreyansh ❤️❤️❤️
Nice explanation
Thanks for watching 😇🙏
bhai katai jhakas >>>
def printFirstNegativeInteger( A, N, k):
i=0
que=[]
ans=[]
for j in range(N):
if A[j]
Awesome
Understood.
u have taken i and j as int but when j will become equal to N,then can j hold N which is of type long long.Pls explain?
best way to convert story to code with codeStoryWithMike
bhai, sabse pehley window length kyun nhi chck krtey if its equal to "k" and then perform operation .. i m curious to know, kyunki window size barabar ho to matlab hai check krney ka , ussey pehley kyun store krkey rakh rehy hain negatives? i might be wrong , but I want to know why ?
Dekho bhai main baat ye h ki sbhi sliding window problem me ye baat specifically haa ki hm tbhi answer ke contribution ko valid mante h jb hmara desired window size achieve Hota haa
Agr tm phle hi window size check karoge to ye ho skta h tm tm galat answer accumulate kr lo ya tmhe unnecessary complications bd jaye
why does the brute force approach passed all the test case in gfg
vector FirstNegativeInteger(vector& arr, int k) {
int n = arr.size();
vector ans(n-k+1);
int idx = 0;
for(int i = 0; i
Bro is this question present in leetcode ,if yes what is the question number?
It is present in geeks for geeks
gold mine
Understood.