macha, last video lo chepinattu ga ne just 2 minutes lo ne code ochesidhi rayadam. chana ease ga chepesthunav macha keep going, thank you so much macha❤
macha daily atleast 2 videos pettu course inka run avthundi kabatti fast ga nerchukodaniki kastam avthadi if available unavi complete ipothe daily oka video kosam wait cheyali thanks macha super explanation.
Ha macha I understood. Problem em ante I am getting very little time to do youtube videos. Chala other works unai full time job and others. But mi kosam consistent ga videos tedaniki try chestha macha.
class Solution { public int longestOnes(int[] nums, int k) { int ans =0; int count=0; int flip =0; int l=0; for(int r =0;r k){ if(nums[l] == 0){ flip--; } if(nums[l]==1){ count--; } l++; } ans = Math.max(ans,r-l+1); } return ans; } }
done with if as well as while loop class Solution(object): def longestOnes(self, nums, k): l=0 count=0 temp=0 ans=0 for r in range(len(nums)): if nums[r]==0: count=count+1
if count>k: if nums[l]==0: count=count-1 l=l+1 if count
Ha macha I understood. Problem em ante I am getting very little time to do youtube videos. Chala other works unai full time job and others. But mi kosam consistent ga videos tedaniki try chestha macha.
@@engineeringanimuthyam hii I'm studying MCA 2nd year ...my graduation will complete on 2024 October...now i would like to learn DSA from beginner...so if I learn this it will take around 1 year to learn..so the company's hire me or not..(and I'm tier 3 MCA college... Could you give me response...how much time to take Learn DSA From beginng....and I know python,html,css, javascript,sql learning...
@@engineeringanimuthyam @engineeringanimuthyam hii I'm studying MCA 2nd year ...my graduation will complete on 2025 October...now i would like to learn DSA from beginner...so if I learn this it will take around 1 year to learn..so the company's hire me or not..(and I'm tier 3 MCA college... Could you give me response...how much time to take Learn DSA From beginng....and I know python,html,css, javascript,sql learning
class Solution { public int longestOnes(int[] nums, int k) { int l=0; int temp=0; int ans=0; for(int r=0;rk) { if(nums[l]==0) { temp--; } l++; } ans=Math.max(ans,r-l+1); } return ans; } }
bro, please increase the time. At least oka pani chey bro, ippudu sliding window chpthunnav kadha inthakmundu already array list,arrays,strings meedha chesam kadha.. vaati meedha cover chesina topics varaku leetcode lo qns home work laga ivvu.. so that videos late aina time thakkuva chesina videos vi we can still practice dsa and consistent ga undagalgutham. Ee oka help they macha.. 'coz time thakkuva ayyesariki consistency pothundhemo anipistundi
Done by done and passed all test cases class Main { public static void main(String args[]) { int arr[]={0,0,1,1,0,0,1,1,1,0,1,1,0,0,0,1,1,1,1}; int k=3; int n=arr.length; int l=0; int temp=0; int ans=0; for(int r=0;rk) { if(arr[l]==0) { temp--; } l++; } ans=Math.max(ans,r-l+1); } System.out.println(ans); } }
// Online Java Compiler // Use this editor to write, compile and run your Java code online class HelloWorld { public static void main(String[] args) { int[] arr={1,1,0,1,0,0,0}; int k=2; int l=0; int temp=0; int ans=0; int n=arr.length; for(int r=0;rk){ if(arr[l]==0){ temp--; } l++; } ans=Math.max(ans,r-l+1); } System.out.println(ans); } }
class Solution { public int longestOnes(int[] nums, int k) { int n = nums.length; int l = 0; int ans = 0; int count =0; for(int r = 0; r< n; r++){ if(nums[r] == 0){ count++; } while(count > k){ if(nums[l] == 0 ){ count--; } l++; } ans = Math.max(ans, (r-l+1)); } return ans;
class Solution { public int longestOnes(int[] nums, int k) { int maxNoOfOnes=0; int l=0; int countOfZeroes=0; for(int r=0;rk){ if(nums[l]==0){ countOfZeroes--; } l++; } maxNoOfOnes=Math.max(r-l+1,maxNoOfOnes); } return maxNoOfOnes;
Macha java or python okate cheppu macha . Please gap vachesthundhi. Memu ardham chesukogalam neku full time job and other works so oka language full pledged ga complete chey macha . Tharavatha vere language ki vellu please.
maccha nuvvu first 5 min chesina problem gurthutecchukunna and aaa problem statement correct ga chadavagaane ardam ayyidni leet code problem lo kuda indirect ga adigindi ide kada ani first 5 min lo cheisna problem ni 1 sec lo copy paste chesa occheisndi leet code medium problem class Solution { public int longestOnes(int[] nums, int k) { int l=0; int n=nums.length; int ans=0; int temp=0; for(int r=0;rk){ if(nums[l]==0){ temp=temp-1; } l=l+1; } ans=Math.max(r-l+1,ans); } return ans; } }
Ha macha I understood. Problem em ante I am getting very little time to do youtube videos. Chala other works unai full time job and others. But mi kosam consistent ga videos tedaniki try chestha macha.
class Solution { public int longestOnes(int[] arr, int k) { int l = 0; int count_ones = 0; int count_zero = 0; int ans = 0; for(int r = 0; rk) { if(arr[l]==1) count_ones--; if(arr[l]==0) count_zero--; l++; } ans = Math.max(ans, count_ones+count_zero); } return ans; } } 20 mins alochinchamanv kada edi chesa 17 mins lo chesa taruvata video chusa navvu kunna solution munde rasa ani
class Solution { public int longestOnes(int[] nums, int k) { int left=0; int temp=0; int ans=0; for(int right=0;rightk) { if(nums[left]==0) { temp--; } left++; } ans=Math.max(ans,right-left+1); } return ans; } }
class Solution { public int longestOnes(int[] nums, int k) { int n = nums.length; int left = 0; int max = 0; int count = 0; for(int r = 0; r k){ if(nums[left] == 0){ count--; } left++; } max = Math.max(max,r-left+1); } return max; } }
Macha really amazing bale cheptunnav i am completely addicted to dsa macha😊😊
Can't stop watching this playlist... it's like webseries
Waiting for graphs and such hard topics to make it easy with your support
Thanks a lot macha❤
macha, last video lo chepinattu ga ne just 2 minutes lo ne code ochesidhi rayadam. chana ease ga chepesthunav macha keep going, thank you so much macha❤
😁 congratulations for improvement. All the best 🥳. Thankyou for support
solved macha 😱
super macha. thank you so much. please try to give more homework problems, so that we can practice more.
macha daily atleast 2 videos pettu course inka run avthundi kabatti fast ga nerchukodaniki kastam avthadi if available unavi complete ipothe daily oka video kosam wait cheyali thanks macha super explanation.
Macha nee explanation tho ee problem ni just ala oka 10 mins lo chsesa nice macha keep going
Anna add more problems. Chala intresting undhi. Your teaching is like a pro. One more request anna do more lectures every day
Ha macha I understood.
Problem em ante I am getting very little time to do youtube videos. Chala other works unai full time job and others. But mi kosam consistent ga videos tedaniki try chestha macha.
And yes!! I have recommended my friends about your videos.
class Solution {
public int longestOnes(int[] nums, int k) {
int ans =0;
int count=0;
int flip =0;
int l=0;
for(int r =0;r k){
if(nums[l] == 0){
flip--;
}
if(nums[l]==1){
count--;
}
l++;
}
ans = Math.max(ans,r-l+1);
}
return ans;
}
}
nv cheppinadhi problem solved by myself bro....tq so much
solved it myself!!
Hi anna Resume ela Cheyalo Free Templetes and Ne Resume tho explain chesi oka Video Chey bro ATS Resume.
done with if as well as while loop
class Solution(object):
def longestOnes(self, nums, k):
l=0
count=0
temp=0
ans=0
for r in range(len(nums)):
if nums[r]==0:
count=count+1
if count>k:
if nums[l]==0:
count=count-1
l=l+1
if count
bro increase the duration,really its too good. waiting for next lecture
Ha macha I understood.
Problem em ante I am getting very little time to do youtube videos. Chala other works unai full time job and others. But mi kosam consistent ga videos tedaniki try chestha macha.
always waiting for you classes
@@engineeringanimuthyam hii I'm studying MCA 2nd year ...my graduation will complete on 2024 October...now i would like to learn DSA from beginner...so if I learn this it will take around 1 year to learn..so the company's hire me or not..(and I'm tier 3 MCA college... Could you give me response...how much time to take Learn DSA From beginng....and I know python,html,css, javascript,sql learning...
@@engineeringanimuthyam
@engineeringanimuthyam hii I'm studying MCA 2nd year ...my graduation will complete on 2025 October...now i would like to learn DSA from beginner...so if I learn this it will take around 1 year to learn..so the company's hire me or not..(and I'm tier 3 MCA college... Could you give me response...how much time to take Learn DSA From beginng....and I know python,html,css, javascript,sql learning
class Solution {
public int longestOnes(int[] nums, int k) {
int l=0;
int temp=0;
int ans=0;
for(int r=0;rk)
{
if(nums[l]==0)
{
temp--;
}
l++;
}
ans=Math.max(ans,r-l+1);
}
return ans;
}
}
without sliding window
class Solution(object):
def findMaxConsecutiveOnes(self, nums):
temp=0
ans=0
for i in nums:
if i==1:
temp=temp+1
if i!=1:
temp=0
ans=max(ans,temp)
return ans
Idhi vere question. Easy level question
vere level bro teaching excellent
goooooooooooooooooooooooooooooooood
bro, please increase the time. At least oka pani chey bro, ippudu sliding window chpthunnav kadha inthakmundu already array list,arrays,strings meedha chesam kadha.. vaati meedha cover chesina topics varaku leetcode lo qns home work laga ivvu.. so that videos late aina time thakkuva chesina videos vi we can still practice dsa and consistent ga undagalgutham. Ee oka help they macha.. 'coz time thakkuva ayyesariki consistency pothundhemo anipistundi
super macha
Done by done and passed all test cases
class Main
{
public static void main(String args[])
{
int arr[]={0,0,1,1,0,0,1,1,1,0,1,1,0,0,0,1,1,1,1};
int k=3;
int n=arr.length;
int l=0;
int temp=0;
int ans=0;
for(int r=0;rk)
{
if(arr[l]==0)
{
temp--;
}
l++;
}
ans=Math.max(ans,r-l+1);
}
System.out.println(ans);
}
}
Linked list is very important but you should teach before hash concept right?
macha koncham video length increase chey and topics kocham fast ga complete chey
Broo linkedList pinna oka video cheyadhi plzz mids unnaayi 14th ki exam aa video chusina artham aytha leee so meru kocham help cheyadhi
// Online Java Compiler
// Use this editor to write, compile and run your Java code online
class HelloWorld {
public static void main(String[] args) {
int[] arr={1,1,0,1,0,0,0};
int k=2;
int l=0;
int temp=0;
int ans=0;
int n=arr.length;
for(int r=0;rk){
if(arr[l]==0){
temp--;
}
l++;
}
ans=Math.max(ans,r-l+1);
}
System.out.println(ans);
}
}
Anna emindhi anna emina problem aa ?? 2 days nunchi lectures raledhu daily cheydanki try chey anna pls
class Solution {
public int longestOnes(int[] nums, int k) {
int n = nums.length;
int l = 0;
int ans = 0;
int count =0;
for(int r = 0; r< n; r++){
if(nums[r] == 0){
count++;
}
while(count > k){
if(nums[l] == 0 ){
count--;
}
l++;
}
ans = Math.max(ans, (r-l+1));
}
return ans;
}
}
class Solution {
public int longestOnes(int[] nums, int k) {
int maxNoOfOnes=0;
int l=0;
int countOfZeroes=0;
for(int r=0;rk){
if(nums[l]==0){
countOfZeroes--;
}
l++;
}
maxNoOfOnes=Math.max(r-l+1,maxNoOfOnes);
}
return maxNoOfOnes;
}
}
Macha java or python okate cheppu macha . Please gap vachesthundhi. Memu ardham chesukogalam neku full time job and other works so oka language full pledged ga complete chey macha . Tharavatha vere language ki vellu please.
Macha Part 35?
maccha nuvvu first 5 min chesina problem gurthutecchukunna and aaa problem statement correct ga chadavagaane ardam ayyidni leet code problem lo kuda indirect ga adigindi ide kada ani first 5 min lo cheisna problem ni 1 sec lo copy paste chesa occheisndi leet code medium problem
class Solution {
public int longestOnes(int[] nums, int k) {
int l=0;
int n=nums.length;
int ans=0;
int temp=0;
for(int r=0;rk){
if(nums[l]==0){
temp=temp-1;
}
l=l+1;
}
ans=Math.max(r-l+1,ans);
}
return ans;
}
}
😍🤩😁solution chudakunda chesa macha
class Solution {
public int longestOnes(int[] nums, int k) {
int temp = 0;
int maxLength = 0;
int l = 0;
for(int r=0;rk){
if(nums[l]==0){
temp--;
}
l++;
}
maxLength = Math.max(maxLength, r-l+1);
}
return maxLength;
}
}
Macha video radha ?
bro pls increase the duration so that we can solve more problems in short period of time
Ha macha I understood.
Problem em ante I am getting very little time to do youtube videos. Chala other works unai full time job and others. But mi kosam consistent ga videos tedaniki try chestha macha.
class Solution {
public int longestOnes(int[] arr, int k) {
int l = 0;
int count_ones = 0;
int count_zero = 0;
int ans = 0;
for(int r = 0; rk) {
if(arr[l]==1) count_ones--;
if(arr[l]==0) count_zero--;
l++;
}
ans = Math.max(ans, count_ones+count_zero);
}
return ans;
}
}
20 mins alochinchamanv kada edi chesa 17 mins lo chesa taruvata video chusa navvu kunna solution munde rasa ani
bro same logic ee kada before problem lane....adhi try chesa vacindhi successful ga, but logic matram meru cheppakane inka clear ga ardamayindhi
❤❤❤❤❤
Macha emaindhi?
class Solution {
public int longestOnes(int[] nums, int k) {
int left=0;
int temp=0;
int ans=0;
for(int right=0;rightk)
{
if(nums[left]==0)
{
temp--;
}
left++;
}
ans=Math.max(ans,right-left+1);
}
return ans;
}
}
class Solution {
public int longestOnes(int[] nums, int k) {
int n = nums.length;
int left = 0;
int max = 0;
int count = 0;
for(int r = 0; r k){
if(nums[left] == 0){
count--;
}
left++;
}
max = Math.max(max,r-left+1);
}
return max;
}
}