Frog Jump II
בינוני
שאלה מראיונות עבודה ממאגר שאלות של LeetCode שאלה מספר 2498 נשאל ב: Checkpoint
Given an array representing stones' positions, determine the minimal maximum jump for the frog to reach the end.
פתרון קוד
JavaScript
Python
function maxJump(stones) {
let answer = stones[1] - stones[0];
for (let i = 2; i < stones.length; i++) {
answer = Math.max(answer, stones[i] - stones[i - 2]);
}
return answer;
}הסבר וידאו כיצד לפתור את השאלה

לעבור את ראיון העבודה הבא שלך בהצלחה
קורס דיגיטלי מקיף עם +25 שיעורים מעשיים, כשעתיים של וידאו, וליווי של מראיין בכיר.