Frog Jump II - Greedy - Leetcode 2498 - Python

preview_player
Показать описание
Frog Jump II / Frog Jump 2
Leetcode 2498 - Leetcode Medium
Biweekly Contest 93
Leetcode Contest
Topics Covered: Greedy
Python

CHAPTERS
00:00 Problem Description
00:43 Example
01:36 Intuition
06:47 Time & Space Complexity
07:00 Coding Solution

Equipment I use to make these videos:

#leetcode
#faang
#programming
#binarysearch
#heap
#bfs
#stack
#hashmap
#dfs
#binarysearchtree
#prims
#codinginterviews
#codinginterviewquestions
#codinginterview
#codeforces
#placement
Рекомендации по теме
Комментарии
Автор

I have totally understood the problem now ). thanks

flutterhacks
Автор

Hello, Thank you for helping understanding and solving the problem. I have written the code before I have seen your's but with yours instruction. But how i derive this... to take in the calculation every stone[i] stone[i + 2] stone.... . What is the intuition behind it ? Because when you look at the problem you can easy tough you can jump directly from 0 index to e.g. 7 index for an array of 15 size, why not ? Other solutions are with binary search I didn't get the logic really, why it works :).

thehappydeveloperguide
visit shbcf.ru