Soumya Bhattacharjee
Soumya Bhattacharjee
  • Видео 208
  • Просмотров 62 486
Find the Power of K-Size Subarrays II (Leetcode BiWeekly 137)
Watch in 1.5X
Here I have provided the solution and explanation of the 3rd problem of Leetcode BiWeekly 137
Code: leetcode.com/contest/biweekly-contest-137/submissions/detail/1359000638/
#leetcode #Leetcode #Weekly #programming #cp #codechef #codeforces
Просмотров: 56

Видео

Maximum Value Sum by Placing Three Rooks II (Leetcode BiWeekly 137)
Просмотров 54121 час назад
Watch in 1.5X Here I have provided the solution and explanation of the 4th problem of Leetcode BiWeekly 137 Code: leetcode.com/contest/biweekly-contest-137/submissions/detail/1359153697/ #leetcode #Leetcode #Weekly #programming #cp #codechef #codeforces
E - Xor Sigma Problem (AtCoder Beginner Contest 365)
Просмотров 18121 день назад
Code: atcoder.jp/contests/abc365/submissions/56273948 #atcoder #codechef #codeforces #arc #cp #abc #Atcoder
Number of Subarrays With AND Value of K (Leetcode Biweekly 134)
Просмотров 238Месяц назад
Watch in 1.5X Here I have provided the solution and explanation of the 4th problem of Leetcode Biweekly 134 Code: leetcode.com/contest/biweekly-contest-134/submissions/detail/1311758863/ #leetcode #Leetcode #Weekly #programming #cp #codechef #codeforces
F - x = a^b (AtCoder Beginner Contest 361)
Просмотров 94Месяц назад
Code: atcoder.jp/contests/abc361/submissions/55303548 #atcoder #codechef #codeforces #arc #cp #abc #Atcoder
E - Tree and Hamilton Path 2 (AtCoder Beginner Contest 361)
Просмотров 57Месяц назад
Code: atcoder.jp/contests/abc361/submissions/55290666 #atcoder #codechef #codeforces #arc #cp #abc #Atcoder
E - Random Swaps of Balls (AtCoder Beginner Contest 360)
Просмотров 142Месяц назад
Code: atcoder.jp/contests/abc360/submissions/55083953 #atcoder #codechef #codeforces #arc #cp #abc #Atcoder
G - Suitable Edit for LIS (AtCoder Beginner Contest 360)
Просмотров 90Месяц назад
Code: atcoder.jp/contests/abc360/submissions/55099958 #atcoder #codechef #codeforces #arc #cp #abc #Atcoder
Leetcode Weekly 404 Screencast (All problems)
Просмотров 103Месяц назад
Use earphones for a better experience #leetcodecontest #leetcode #weekly #programming #cp #codechef #codeforces
Find Minimum Diameter After Merging Two Trees (Leetcode Weekly 404)
Просмотров 83Месяц назад
Watch in 1.5X Here I have provided the solution and explanation of the 4th problem of Leetcode Weekly 404 Code: leetcode.com/contest/weekly-contest-404/submissions/detail/1304395179/ #leetcode #Leetcode #Weekly #programming #cp #codechef #codeforces
F. Non-academic Problem (Codeforces Round 954 (Div. 3) )
Просмотров 4302 месяца назад
Please speed up to 1.5X Code link: codeforces.com/contest/1986/submission/267035954 #leetcode #codeforces #codeforces #programming #cp
E. Beautiful Array (Codeforces Round 954 (Div. 3) )
Просмотров 3602 месяца назад
Please speed up to 1.5X Code link: codeforces.com/contest/1986/submission/267026438 #leetcode #codeforces #codeforces #programming #cp
D. Mathematical Problem (Codeforces Round 954 (Div. 3) )
Просмотров 3562 месяца назад
Please speed up to 1.5X Code link: codeforces.com/contest/1986/submission/267080889 #leetcode #codeforces #codeforces #programming #cp
Find the Minimum Area to Cover All Ones II (Leetcode Weekly 403)
Просмотров 2122 месяца назад
Watch in 1.5X Here I have provided the solution and explanation of the 4thproblem of Leetcode Weekly 403 Code: leetcode.com/contest/weekly-contest-403/submissions/detail/1297356516/ #leetcode #Leetcode #Weekly #programming #cp #codechef #codeforces
Leetcode Weekly 403 Screencast (All problems)
Просмотров 822 месяца назад
Use earphones for a better experience #leetcodecontest #leetcode #weekly #programming #cp #codechef #codeforces
E - Water Tank (AtCoder Beginner Contest 359)
Просмотров 1042 месяца назад
E - Water Tank (AtCoder Beginner Contest 359)
D - Avoid K Palindrome (AtCoder Beginner Contest 359)
Просмотров 3002 месяца назад
D - Avoid K Palindrome (AtCoder Beginner Contest 359)
C - Tile Distance 2 (AtCoder Beginner Contest 359)
Просмотров 1492 месяца назад
C - Tile Distance 2 (AtCoder Beginner Contest 359)
Leetcode Weekly 402 Screencast + Explanation(All problems)
Просмотров 1952 месяца назад
Leetcode Weekly 402 Screencast Explanation(All problems)
G - AtCoder Tour (AtCoder Beginner Contest 358)
Просмотров 1142 месяца назад
G - AtCoder Tour (AtCoder Beginner Contest 358)
E - Alphabet Tiles (AtCoder Beginner Contest 358)
Просмотров 2162 месяца назад
E - Alphabet Tiles (AtCoder Beginner Contest 358)
Leetcode Biweekly 132 Screencast(All problems)
Просмотров 2942 месяца назад
Leetcode Biweekly 132 Screencast(All problems)
E - Reachability in Functional Graph (AtCoder Beginner Contest 357)
Просмотров 1692 месяца назад
E - Reachability in Functional Graph (AtCoder Beginner Contest 357)
D - 88888888 (AtCoder Beginner Contest 357)
Просмотров 1522 месяца назад
D - 88888888 (AtCoder Beginner Contest 357)
Lexicographically Minimum String After Removing Stars (Leetcode Weekly 400)
Просмотров 412 месяца назад
Lexicographically Minimum String After Removing Stars (Leetcode Weekly 400)
Find Subarray With Bitwise AND Closest to K (Leetcode Weekly 400)
Просмотров 1012 месяца назад
Find Subarray With Bitwise AND Closest to K (Leetcode Weekly 400)
Count Days Without Meetings (Leetcode Weekly 400)
Просмотров 992 месяца назад
Count Days Without Meetings (Leetcode Weekly 400)
Block Placement Queries (Leetcode Biweekly 131)
Просмотров 3793 месяца назад
Block Placement Queries (Leetcode Biweekly 131)
Leetcode Biweekly 131 Screencast(All problems, use earphones)
Просмотров 1603 месяца назад
Leetcode Biweekly 131 Screencast(All problems, use earphones)
D - AtCoder Wallpaper (AtCoder Beginner Contest 354)
Просмотров 1203 месяца назад
D - AtCoder Wallpaper (AtCoder Beginner Contest 354)

Комментарии

  • @user-ly4ou1qw3n
    @user-ly4ou1qw3n День назад

    Detto code but gives the now , they added so.e extra test cases

  • @TarunSantani
    @TarunSantani 8 дней назад

    Didn't understand the part of the pigeon hole principle. - how did you use it ? Can you explain it in somewhat easy way.

    • @soumyabhattacharjee1051
      @soumyabhattacharjee1051 8 дней назад

      Pigeon hole principle says that if there are N numbers and we are taking N+1 numbers then at least one number bound to get repeated. Similar concept here, let say if the N+M-1 cells are from the same row and same column of the current cell and we take N+M+1 max cells then we are going to find the max and second max excluding all the cells of the current cell's row and column If you find this helpful, please like and subscribe

    • @TarunSantani
      @TarunSantani 8 дней назад

      @@soumyabhattacharjee1051 ok thank you I will rewatch the video

  • @mohammadehson1585
    @mohammadehson1585 15 дней назад

    Bhai kya bawasir he ye solution bhi shi nhi he

  • @arshlanali5665
    @arshlanali5665 16 дней назад

    Great solution!

  • @mowafkmha4505
    @mowafkmha4505 22 дня назад

    nice approach of counting the number of segments which will have odd and even number of 1's . there is actually an easier approach which aryanc explained using the prefix xor but it might be a little hard to think about the prefix xor which will make the counting much more simpler

  • @therawringkitty
    @therawringkitty 23 дня назад

    Can you explain solution of problem G?

  • @adi4178
    @adi4178 Месяц назад

    You explain well, I recomand you to give us all approach from brute force to optimal, If you do it your chanal will grow because no one do this.

  • @prajjawalsingh4952
    @prajjawalsingh4952 Месяц назад

    nice explanation 👍

  • @ouvik9509
    @ouvik9509 Месяц назад

    very helpful dada ❤

  • @kashishchawla2754
    @kashishchawla2754 Месяц назад

    d problem?

    • @soumyabhattacharjee1051
      @soumyabhattacharjee1051 Месяц назад

      D is kind of a simple breadth-first search, so have not covered it, you can check my solution atcoder.jp/contests/abc361/submissions/55280719 and ask me if there is any doubt

    • @kashishchawla2754
      @kashishchawla2754 Месяц назад

      @@soumyabhattacharjee1051 understood the approach, how can we be sure about the tc, can u pls elborate

    • @soumyabhattacharjee1051
      @soumyabhattacharjee1051 Месяц назад

      @@kashishchawla2754 The total number of states are at max O(N2^N) N for choosing the i where i and i+1 are spaces and 2^N for combinations of other. Now for each space the rearrangement is O(N) so overall complexity should not be more than O(N^2*2^N) Please like and subscribe if it is helpful

  • @kashishchawla2754
    @kashishchawla2754 Месяц назад

    thanks

  • @PubgMerabeta
    @PubgMerabeta Месяц назад

    Bro can you explain C and D prb too?

    • @soumyabhattacharjee1051
      @soumyabhattacharjee1051 Месяц назад

      D is kind of a simple breadth-first search, so have not covered it, you can check my solution atcoder.jp/contests/abc361/submissions/55280719 and ask me if there is any doubt For C you can think about having a subsequence of N-K elements, so we can sort it and consider every subarray of size n-k. Here is my solution atcoder.jp/contests/abc361/submissions/55269760

  • @Jafar801
    @Jafar801 Месяц назад

    Your explanations are way better than @aryanc's. Thank you for making such good explanatory videos. Keep it up!

  • @darkknight98-v
    @darkknight98-v Месяц назад

    thanks for such a simple and great explanation sir!

  • @furynick1620
    @furynick1620 Месяц назад

    Thank you sir. I learnt a lot from you.

  • @avijitbiswas3544
    @avijitbiswas3544 Месяц назад

    dp[i][1] = ( 1 + (n - 1) * (n - 1) ) * dp[i - 1] [1] can you explain why you are adding + 1 there. that part is already cover na?

    • @soumyabhattacharjee1051
      @soumyabhattacharjee1051 Месяц назад

      No (n-1)(n-1) is for choosing anything other than the current j, and 1 when getting (j,j) Please like, share and subscribe if it's helpful

    • @avijitbiswas3544
      @avijitbiswas3544 Месяц назад

      @@soumyabhattacharjee1051 subscribed sir

  • @angryman5517
    @angryman5517 Месяц назад

    Bro,can you help with B? I am trying to code it in python

    • @soumyabhattacharjee1051
      @soumyabhattacharjee1051 Месяц назад

      Try to contruct the string for every value of c and w Here is my python code for ref: atcoder.jp/contests/abc360/submissions/55056440 Please like and subscribe if it is hepful

  • @ITACHIUCHIHA-dr8sz
    @ITACHIUCHIHA-dr8sz Месяц назад

    underrated channel, love these crisp explanations over those 40 to 60 minute long other video solutions

    • @soumyabhattacharjee1051
      @soumyabhattacharjee1051 Месяц назад

      Thank you so much for the appreciation, it means a lot. Hope you subscribed 😀

  • @amolmittal8895
    @amolmittal8895 Месяц назад

    great solution😊

  • @kz_cbble9670
    @kz_cbble9670 Месяц назад

    why did u stop codeforces?

    • @soumyabhattacharjee1051
      @soumyabhattacharjee1051 Месяц назад

      Generally cf contests are on weekdays and I do not get time to attend those. If there is some on weekend I can check those. As I am not regular and codeforces contests need grinding, I avoid participating rated. If there is something unrated like div3 in weekends I will definitely try to do it

    • @kz_cbble9670
      @kz_cbble9670 Месяц назад

      @@soumyabhattacharjee1051 Understandable.. bro has a job to keep

  • @blazerchicken1619
    @blazerchicken1619 Месяц назад

    Thank you, finally understood what the problem was trying to say

    • @soumyabhattacharjee1051
      @soumyabhattacharjee1051 Месяц назад

      Thanks for the appreciation, please subscribe if you have not already 😃

  • @Dhruv-fn8yr
    @Dhruv-fn8yr 2 месяца назад

    provide solution for probem G

  • @shubhamtanwar7039
    @shubhamtanwar7039 2 месяца назад

    great explaination

  • @shivamshrivastava5636
    @shivamshrivastava5636 2 месяца назад

    Sir in case one of the values contains an odd number of elements, we have to ignore one of the elements. My intuition was to two create two cases: In the first case we will ignore the smallest element of the set and in the second case we will ignore the largest element of the set, we will take the minimum of the two cases in our answer. However, my approach is failing on some of the test cases.

    • @soumyabhattacharjee1051
      @soumyabhattacharjee1051 2 месяца назад

      Consider the case 1 3 9 15 17 Here we have to ignore 9 which is neither max or min Please subscribe if you find this helpful

  • @FactsPolice
    @FactsPolice 2 месяца назад

    Bro 23311's output is 19

    • @soumyabhattacharjee1051
      @soumyabhattacharjee1051 2 месяца назад

      Sorry, did not get it. Can you elaborate?

    • @FactsPolice
      @FactsPolice 2 месяца назад

      @@soumyabhattacharjee1051 look at the first test case's 7th number input and output

  • @manmeet704
    @manmeet704 2 месяца назад

    Could u recommend some dp on bits questions

  • @thequacker6504
    @thequacker6504 2 месяца назад

    this contest was more difficult than past contests

    • @soumyabhattacharjee1051
      @soumyabhattacharjee1051 2 месяца назад

      Yes this C broke the flow of the contest, maybe easier C would be better

  • @The-fc1fi
    @The-fc1fi 2 месяца назад

    Biweekly 4th question

  • @amimultamim9893
    @amimultamim9893 2 месяца назад

    Thanks a lot!

  • @sudhanshunain4690
    @sudhanshunain4690 2 месяца назад

    thank u!! I thought the same idea but wasnt able to implement it. Can you also discuss 2 more approaches given in editorial, 1) By SCC and topological sort 2) Something related to depth of directed tree etc.

  • @code4111
    @code4111 2 месяца назад

    Great explanation ❤️❤️

  • @Anonymous____________A721
    @Anonymous____________A721 2 месяца назад

    Can we do rerooting instead of "in-out dp"

  • @helpingcoder1910
    @helpingcoder1910 2 месяца назад

    👍

  • @kashishchawla2754
    @kashishchawla2754 2 месяца назад

    g problem pls, thanks:)

    • @soumyabhattacharjee1051
      @soumyabhattacharjee1051 2 месяца назад

      Its already there in the channel, please check. Thanks. Please subscribe

  • @darksidekiller5300
    @darksidekiller5300 2 месяца назад

    amazing screencast Can you please explain the last question in detail? Thank you

  • @mayankshakya9200
    @mayankshakya9200 2 месяца назад

    Bhaiya is there any way to connect with you?

  • @solvinglife6658
    @solvinglife6658 2 месяца назад

    Cfbr

  • @Anonymous____________A721
    @Anonymous____________A721 2 месяца назад

    Excellent subscribed But can we do this with heap/sliding window

  • @thequacker6504
    @thequacker6504 2 месяца назад

    the code you have provided has used (n*s) while calculating the power which will overflow in cpp but gets accepted in python but in cpp to do binary exponentiation of (10,n*s) we will have to use euler totient function of mod

    • @soumyabhattacharjee1051
      @soumyabhattacharjee1051 2 месяца назад

      Not necessarily, 2 tricks you can use for the given constraints. Unsigned long long instead of long long to store r=10^s, and then you can use (r^n-1)/(r-1). You can check my code atcoder.jp/contests/abc357/submissions/54462244. Please like and subscribe if it is helpful

    • @thequacker6504
      @thequacker6504 2 месяца назад

      @@soumyabhattacharjee1051 got it thanks! Subscribed!

  • @helpingcoder1910
    @helpingcoder1910 2 месяца назад

    there is one more condition. that when you do (a/b) % m. b should not be integral multiple of m. How do you prove that here (10 ^ k - 1) is not multiple of mod= 998244353 ??

    • @soumyabhattacharjee1051
      @soumyabhattacharjee1051 2 месяца назад

      You can check out the article link I have provided in the description for further details, generally if the modulo is prime I use this formula but have not checked the proof yet. Please like and subscribe if you find this helpful

  • @helpingcoder1910
    @helpingcoder1910 2 месяца назад

    👍

  • @terrytao7640
    @terrytao7640 2 месяца назад

    solved it by myself..thanks

  • @ayush2060
    @ayush2060 2 месяца назад

    not understandable at all

  • @palakaggarwal5327
    @palakaggarwal5327 2 месяца назад

    Amazing approach! Thanks for sharing. How did u come up with this one?

    • @soumyabhattacharjee1051
      @soumyabhattacharjee1051 2 месяца назад

      You can check my screencast for this contest ruclips.net/video/-S_n2mNpwqU/видео.html (Please use earphones)

  • @AMITSHARMA-zt4ee
    @AMITSHARMA-zt4ee 3 месяца назад

    bro mic thik kr lo apna awaz hi nhi aa rhi hai , itna dhree bol rhe ho

    • @soumyabhattacharjee1051
      @soumyabhattacharjee1051 3 месяца назад

      Yes some issue with the voice today, please use earphones for now. Will improve it surely

  • @jayantsharma3968
    @jayantsharma3968 3 месяца назад

    Great explanation!

  • @akashtomar6115
    @akashtomar6115 3 месяца назад

    Thanks

  • @darkknight98-v
    @darkknight98-v 3 месяца назад

    Sir can you explain the transitions again? i mean why you used AND if turn==0 and OR otherwise

    • @soumyabhattacharjee1051
      @soumyabhattacharjee1051 3 месяца назад

      ans means who is winning. Its initialized to the opposite of the current player. So let say if its 0's turn then ans=1. Now if any one of the possible (i,j) leads us to the 0 then the current player will win. So we are taking bitwise and. Because only one 0 will make the answer 0. Similar for 1, we are taking OR because only one 1 will make the ans 1. If you find this helpful please like, share and subscribe, thanks

    • @darkknight98-v
      @darkknight98-v 3 месяца назад

      @@soumyabhattacharjee1051 oh got it! thanks a lot again! also sir, can you refer some problems of bitmask dp(cf or atcoder) to practice because I just got introduced to it through this video.

  • @user-up3ne1sq6t
    @user-up3ne1sq6t 3 месяца назад

    why we are using & in 67th line and | in 68th line this portion is not clear

    • @soumyabhattacharjee1051
      @soumyabhattacharjee1051 3 месяца назад

      ans means who is winning. Its initialized to the opposite of the current player. So let say if its 0's turn then ans=1. Now if any one of the possible (i,j) leads us to the 0 then the current player will win. So we are taking bitwise and. Because only one 0 will make the answer 0. Similar for 1, we are taking OR because only one 1 will make the ans 1. If you find this helpful please like, share and subscribe, thanks

  • @user-mi4fd5qt2u
    @user-mi4fd5qt2u 3 месяца назад

    Good One Bro !!