Це відео не доступне.
Перепрошуємо.
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
great logical thinking👍
The outstanding logic 🤯
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
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!
amazing, didn't think of using an existing solution. Thankyou!
What an amazing approach sir👍🙌
Can you please list down a few questions relating to this concept?
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
quite a good approach man I like it
bhai jordar approach hai
Excellent explanation, and broken down well. Your explanation is quite intuitive to understand.
Excellent brother
loved the idea to solve, man you made this into such a easy one cant tell you
I downloaded yesterday and watched....n I came today again just to comment...thankyou so much
Nice video Sir, thanks again.
nice video
Bhai mjaa aa gya shi mai
Great Explanation Bro !!!
Glad you liked it
Great
you are an artist bro, upload more videos and imrove videos you will go long way :)
can you please mention(problems links) which all other questions are based on this same approach ?
SC is O(n) ? Because it using an extra prefix array to store the counts.
greatttt
Amazing, thanks a ton!!!
Glad you liked it!. Please share the channel with all your friends and subscribe.
woah
Please share the channel with all your friends and subscribe 😀🙏.
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 ?
its the most basic question of dsa, u need to know that
@@dustbiny.3968 ni hori yrr dsa BC !!
Can we solve this without extra space and linear time complexity??
I dont think you can
Also, can you solve "Count number of good subarrays" Recent LC contest question: LC 2537
What is sum=y and sum=x? Can you give examples? I don't understand that part 6:12
bro it is not optimal , TC-> O(n) , SC - > O(n) , interviewer would say to optimize it to SC O(1)
Great, but how to Identify this type of question
by practice and observation
jhaanu
Not good explanation, unreadable code
Not for beginners 💀☠️