A-F | Codechef Starters 130 Editorials | Updating A | Good Binary String | Make Equal | Abhinav

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 พ.ย. 2024

ความคิดเห็น • 41

  • @AbhinavAwasthi
    @AbhinavAwasthi  6 หลายเดือนก่อน +2

    DM me on Instagram for CP Expert Sheet 🚀

  • @aman_rockstar31
    @aman_rockstar31 6 หลายเดือนก่อน +4

    amazing explanation brother now i just see your videos and i understand all the things very well

  • @PrinceKumar-gl5fk
    @PrinceKumar-gl5fk 6 หลายเดือนก่อน +1

    One of the good way to solve the last problem would have been
    Take two vector v1 and v2
    If input is less than zero push back in v1
    If input is greater than equal to zero push back in v2
    Now find sum of v1 and multiply with -2 and add it to sum of v2 that would be the ans 😅

    • @AbhinavAwasthi
      @AbhinavAwasthi  6 หลายเดือนก่อน

      Bro, it's wrong, you can try, we don't want subsequence, we want substring

    • @PrinceKumar-gl5fk
      @PrinceKumar-gl5fk 6 หลายเดือนก่อน

      @@AbhinavAwasthi yes sir.
      🥲

  • @asadshoyebkhan
    @asadshoyebkhan 6 หลายเดือนก่อน +1

    For Last Problem (Updating A)
    What if array has single negative element which is minimum than all min subarray for ex. [1, 1, -200, 3, 4, -1, -2], but alice cannot make it positive because he cannot choose subaary of length 1, it is given (L

  • @syedfazil2998
    @syedfazil2998 6 หลายเดือนก่อน +2

    How to build this kind of intuition like in the last question?
    Great explanation btw ❤❤

    • @AbhinavAwasthi
      @AbhinavAwasthi  6 หลายเดือนก่อน +1

      It's all about practice, thanks!

  • @sahilanand30
    @sahilanand30 6 หลายเดือนก่อน +4

    Awesome explanation ❤

  • @sanskardhyani4112
    @sanskardhyani4112 6 หลายเดือนก่อน +2

    00:03 Discussion of quick solutions for Codechef Starters 130 problems.
    02:14 Convert binary string to alternating string with bit flipping
    06:36 Transforming array values to make them equal
    08:49 Make all array elements equal using specific conditions.
    13:16 Determine if a string can be flipped to have an even number of alternating characters
    15:31 Understanding the partition of the string based on conditions
    19:55 Optimizing sum by changing substrings
    22:18 Strategic gameplay between alice and Bob
    26:56 Explanation of calculating minimum sum for substring

  • @TheAI-Tutor
    @TheAI-Tutor 6 หลายเดือนก่อน +1

    Make binary strings is good one, I’m a newbie in CP then how to solve such questions going ahead?

    • @AbhinavAwasthi
      @AbhinavAwasthi  6 หลายเดือนก่อน

      Practice is the key, practice problems regularly and participate in contests

  • @AbhayNegi-qs1fc
    @AbhayNegi-qs1fc 6 หลายเดือนก่อน +1

    How updating A question works??
    In the question it is given that the size of subarray should be atleast 2. And it is possible that kadane's algorithm find single -ve no. Which is minimum. Eg. 1 4 -10 5 15 -2 -3
    -2 2 . Here the least no. Should be -10 but we cant remove -10 as the size of subarray is 1 .
    Please explain

    • @AbhishekKumar-rr7od
      @AbhishekKumar-rr7od 6 หลายเดือนก่อน +1

      What is shown in the code isn't directly kadane's algo. If you will check it, it considers at least two elements for min value

    • @AbhayNegi-qs1fc
      @AbhayNegi-qs1fc 6 หลายเดือนก่อน

      Got it. But how do you approach this method ?
      Is this some classical problem(for atleast length 2) or we can find minimum sum subarray with atleast k elements? Pls explain

    • @ronakkriplani1838
      @ronakkriplani1838 6 หลายเดือนก่อน +2

      @@AbhayNegi-qs1fc bro why we have taken the previous element 0 in 5 th question

    • @AbhinavAwasthi
      @AbhinavAwasthi  6 หลายเดือนก่อน

      I think multiple people already explained

    • @AbhinavAwasthi
      @AbhinavAwasthi  6 หลายเดือนก่อน

      Ronak, because next two non equal numbers, there will be atleast 1 number which is one

  • @yell0wfl4sh
    @yell0wfl4sh 6 หลายเดือนก่อน +2

    Need explanation for Costly Swapping

  • @gaurav5416
    @gaurav5416 6 หลายเดือนก่อน +1

    Helpful sir

  • @codecreateriitp4751
    @codecreateriitp4751 6 หลายเดือนก่อน +1

    Thanks bhaiya ❤

  • @sbndBhanu546
    @sbndBhanu546 6 หลายเดือนก่อน +1

    sir without dsa till which rating questions we can do in both codechef and codeforces

    • @AbhinavAwasthi
      @AbhinavAwasthi  6 หลายเดือนก่อน

      Bro, learn DSA side by side

  • @jvinay2210
    @jvinay2210 6 หลายเดือนก่อน +1

    why border elemt will be equal a must condition in ques no 3

    • @UttamKumar-cs5pn
      @UttamKumar-cs5pn 6 หลายเดือนก่อน

      as we have to make all the element equal and we cannot change the border element (i.e. the first and last). So, it should be equal initially, otherwise we will not be able to make all the element equal in the given array.

    • @UNKNOWN-tq4lq
      @UNKNOWN-tq4lq 6 หลายเดือนก่อน

      Because see we can't change the border elements as written in the question condition itself so the conditions to fulfilled only if the border elements are equal otherwise no matter what you do the array can't be equalised. Hope this helps .

    • @AbhinavAwasthi
      @AbhinavAwasthi  6 หลายเดือนก่อน

      I think many people already explained

  • @krat9707
    @krat9707 6 หลายเดือนก่อน +1

    COSS ka answer bhi explain kardo yaar

  • @arnobhasan6817
    @arnobhasan6817 6 หลายเดือนก่อน +1

    Helpful