I think both Array and DP problems are equally hard. In DP, you have to catch the pattern which is the hardest bit. And for array problems, you never know when any concept out of the blue can be applied like Counting Sort.
class Solution: def hIndex(self, citations): citations.sort(reverse=True) print(citations) j=0 n=len(citations) for i in citations: if i>j: j+=1 return j
Hi Greg, can you please upload a tutorial about Leetcode Question 34 Find First and Last Position of Element in Sorted Array? I am struggling on it and I need some help. Thank you so much !
@@GregHogg You have the most articulate way of teaching. I've seen any tutors that teach so elegantly. I'd love to see your courses where you go in-depth about concepts.
Master Data Structures & Algorithms for FREE at AlgoMap.io/
Good job of Brute Force and Optimal solution.
I think both Array and DP problems are equally hard. In DP, you have to catch the pattern which is the hardest bit. And for array problems, you never know when any concept out of the blue can be applied like Counting Sort.
OMG if you start explaining even a small kid can understand any complex problem easy-peasy
class Solution:
def hIndex(self, citations):
citations.sort(reverse=True)
print(citations)
j=0
n=len(citations)
for i in citations:
if i>j:
j+=1
return j
Nice explanation for a confusing problem
Good explanation.
Amazing explanation Greg! You helped me to build my intuition. Subscribed!
Your dsa videos are really good…pls try to cover all the topics bro
nice, I have got: "Beats 91%" with this, I kept using the n variable, skipping the h variable, no need for h = n
I think it was only to make it clearer as they're asking for the H Index
Hey, Greg! Great explanation. Can you please make a video on LRU Cache?
amazing bro.
I like this solution, my initial gut feeling made me thing about creating a dictionary of citation counts paired with a rank....
Thanks
Teaching me as if I were dumb. I love that!
This one is pretty tricky so I had to really dumb it down lol
Hi Greg, can you please upload a tutorial about Leetcode Question 34 Find First and Last Position of Element in Sorted Array? I am struggling on it and I need some help. Thank you so much !
Great one! What is the app you use for drawing?
Mira
You should start teaching online officially.
What does that mean exactly haha
@@GregHogg Like starting your website where you offer paid courses. :)
@@GregHogg You have the most articulate way of teaching. I've seen any tutors that teach so elegantly. I'd love to see your courses where you go in-depth about concepts.
Bro…pls make a video on bit manipulation
hi @gregg buddy, can you do a video on LRU cache. Thank you in advance.
Okay I'll try
What drawing software do you use?
oki got thru this , but how tf a test case [11,15] is supose to return 2 , is leetcode drunk orsomething?
There are 2 papers with at least 2 citations. The max h is 2