Це відео не доступне.
Перепрошуємо.

Count number of nice subarrays | LeetCode | Sliding window | Prefix sum | Hashing | DSA

Поділитися
Вставка
  • Опубліковано 2 сер 2021
  • Problem link:
    leetcode.com/p...
    solution:
    ideone.com/ITZTEr
    ___________________________________________________________________________
    All my playlists:
    DSA sheet:
    • 450 questions DSA sheet
    Interview experiences:
    • Internship tests/Inter...
    Leetcode problems:
    • leetcode problems
    projects for resume:
    • Projects for Resume
    Connect with me on LinkedIn:
    / aditya-rajiv-0606491a5
    Connect with me on Instagram:
    / adi_rajiv
    #leetcode #slidingwindow #prefixsum #hashing #dsa #softwareengineer #SDE #Placement #competitiveprogramming #faang #recursion

КОМЕНТАРІ • 42

  • @akshadgupta3925
    @akshadgupta3925 29 днів тому +1

    great logical thinking👍

  • @akashpal7748
    @akashpal7748 7 місяців тому +2

    The outstanding logic 🤯

  • @parthkaushik8365
    @parthkaushik8365 7 місяців тому

    A sub-list refers to a portion or segment of a larger list or sequence. It is created by selecting and extracting a contiguous chunk of elements from the original list. The sublist retains the order of the elements as they appear in the original list.
    For example, consider the list [1, 2, 3, 4, 5]. A sublist can be created by selecting a subset of the elements, such as [2, 3, 4], which consists of three consecutive elements from the original list.
    The original list itself is a sub-list of itself.
    The list [1, 2, 3] will have the following sublists:
    [1]
    [1, 2]
    [1, 2, 3]
    [2]
    [2, 3]
    [3]
    Given a list of numbers
    [2, 4, 5, 3, 1, 6, 9, 7, 10, 8, 15, 17] how many sublists does it have?
    please tell

  • @thegreekgoat98
    @thegreekgoat98 Рік тому

    Thankyou brother. I did many problems with the same concept, but somehow forgot the core concept. I saw this video of your crystal clear explanation and recalled everything. Top notch man!

  • @sujayshanbhag2055
    @sujayshanbhag2055 11 місяців тому

    amazing, didn't think of using an existing solution. Thankyou!

  • @hiteshgurnani4633
    @hiteshgurnani4633 3 роки тому +6

    What an amazing approach sir👍🙌
    Can you please list down a few questions relating to this concept?

    • @adityarajiv6346
      @adityarajiv6346  3 роки тому +1

      Yes okay I shall do that as soon as possible.
      For now in my head I'm getting a question count number if of subarrays with same is even numbers

  • @kyakya6490
    @kyakya6490 2 роки тому +1

    quite a good approach man I like it

  • @hiteshbhatia5609
    @hiteshbhatia5609 Рік тому +1

    bhai jordar approach hai

  • @undergrad4980
    @undergrad4980 Рік тому

    Excellent explanation, and broken down well. Your explanation is quite intuitive to understand.

  • @cdrrjt5005
    @cdrrjt5005 Рік тому +1

    Excellent brother

  • @anshaggarwal6004
    @anshaggarwal6004 2 роки тому +1

    loved the idea to solve, man you made this into such a easy one cant tell you

  • @donthularuchitha7552
    @donthularuchitha7552 11 місяців тому

    I downloaded yesterday and watched....n I came today again just to comment...thankyou so much

  • @deliveringIdeas
    @deliveringIdeas Рік тому +1

    Nice video Sir, thanks again.

  • @impatientgaming9868
    @impatientgaming9868 4 місяці тому

    nice video

  • @sukhpreetsingh5200
    @sukhpreetsingh5200 Рік тому +1

    Bhai mjaa aa gya shi mai

  • @shantanukumar4081
    @shantanukumar4081 2 роки тому +2

    Great Explanation Bro !!!

  • @champion5946
    @champion5946 Рік тому +1

    Great

  • @AmitKumar-xr6cy
    @AmitKumar-xr6cy 2 роки тому

    you are an artist bro, upload more videos and imrove videos you will go long way :)

  • @umeshkaushik710
    @umeshkaushik710 5 місяців тому

    can you please mention(problems links) which all other questions are based on this same approach ?

  • @mart542
    @mart542 2 роки тому +1

    SC is O(n) ? Because it using an extra prefix array to store the counts.

  • @vinayakdubey7823
    @vinayakdubey7823 2 роки тому +1

    greatttt

  • @kshitijgaur9635
    @kshitijgaur9635 3 роки тому +1

    Amazing, thanks a ton!!!

    • @adityarajiv6346
      @adityarajiv6346  3 роки тому

      Glad you liked it!. Please share the channel with all your friends and subscribe.

  • @shouryagupta8763
    @shouryagupta8763 2 роки тому +2

    woah

    • @adityarajiv6346
      @adityarajiv6346  2 роки тому +1

      Please share the channel with all your friends and subscribe 😀🙏.

  • @BobMarley-qh2qs
    @BobMarley-qh2qs Рік тому

    bhai one question tho, like how did u think of that approach , how can u think if we subtract preifx sum with the target we can add the frequency of our answer to final count variable ?

    • @dustbiny.3968
      @dustbiny.3968 7 місяців тому

      its the most basic question of dsa, u need to know that

    • @BobMarley-qh2qs
      @BobMarley-qh2qs 7 місяців тому

      @@dustbiny.3968 ni hori yrr dsa BC !!

  • @tejas7379
    @tejas7379 2 роки тому +1

    Can we solve this without extra space and linear time complexity??

  • @notsodope7227
    @notsodope7227 Рік тому

    Also, can you solve "Count number of good subarrays" Recent LC contest question: LC 2537

  • @GrounDweller
    @GrounDweller Рік тому

    What is sum=y and sum=x? Can you give examples? I don't understand that part 6:12

  • @xolo2617
    @xolo2617 Рік тому

    bro it is not optimal , TC-> O(n) , SC - > O(n) , interviewer would say to optimize it to SC O(1)

  • @sayanroy9161
    @sayanroy9161 3 роки тому +1

    Great, but how to Identify this type of question

  • @hritikbhardwaj6636
    @hritikbhardwaj6636 Рік тому

    jhaanu

  • @nathann4291
    @nathann4291 7 місяців тому

    Not good explanation, unreadable code

  • @sohan_here
    @sohan_here Місяць тому

    Not for beginners 💀☠️