Leetcode with dani
i wrote a code and submitted it but when i looked at it, it always returned True then i wrote this and submitted it and it worked, i didnt expect this answer for DP question😂😂
LeetCode
Stone Game - LeetCode
Can you solve this real interview question? Stone Game - Alice and Bob play a game with piles of stones. There are an even number of piles arranged in a row, and each pile has a positive integer number of stones piles[i].
The objective of the game is to…
The objective of the game is to…
Forwarded from AAU Software Engineering community (Liam)
This media is not supported in your browser
VIEW IN TELEGRAM
🤣9
Mrbeast
Hi Me in 10 Years😁 , what do u think u will be in 10 years from now , let's write down our plan and compare it after 10 years
Oct 5 /2025 -> Oct 5 /2035
Hi Me in 10 Years😁 , what do u think u will be in 10 years from now , let's write down our plan and compare it after 10 years
Oct 5 /2025 -> Oct 5 /2035
YouTube
Hi Me In 10 Years
Holy crap I will probably be so different when this goes public.
I will be done with highschool
I will have gone through college
Probably gotten married (jk I am a loser)
If I still do youtube that will be crazy.
I will be done with highschool
I will have gone through college
Probably gotten married (jk I am a loser)
If I still do youtube that will be crazy.
Comedy
This guy is pure comedy🤣🤣
This guy is pure comedy🤣🤣
YouTube
Daliso Chaponda on What People Think of Africa | Universal Comedy
Britains Got Talent finalist Daliso Chaponda talks about misconceptions about African countries.
Don’t forget to subscribe to Universal Comedy for all your comedy needs - https://www.youtube.com/user/funniestevercomedy?sub_confirmation=1
#StandUp #Comedy
Don’t forget to subscribe to Universal Comedy for all your comedy needs - https://www.youtube.com/user/funniestevercomedy?sub_confirmation=1
#StandUp #Comedy
Leetcode with dani
this question freaks me out 🥵 i coundnt pass the time constraint
n, k = list(map(int, input().split()))
arr = list(map(int, input().split()))
bu = [0] * n
for i in range(len(arr) - 2, -1, -1):
bu[i] = abs(arr[i] - arr[i + 1]) + bu[i + 1]
for j in range(i + 2, min(i + k + 1, len(arr))):
bu[i] = min(abs(arr[i] - arr[j]) + bu[j], bu[i])
print(bu[0])
Leetcode with dani
n, k = list(map(int, input().split())) arr = list(map(int, input().split())) bu = [0] * n for i in range(len(arr) - 2, -1, -1): bu[i] = abs(arr[i] - arr[i + 1]) + bu[i + 1] for j in range(i + 2, min(i + k + 1, len(arr))): bu[i] = min(abs(arr[i]…
the exact answer with c++ passed 😭
😁2