Meta Interview Question - Leetcode 278: First Bad Version

preview_player
Показать описание
Meta Interview Question - Leetcode 278: First Bad Version
Рекомендации по теме
Комментарии
Автор

Master Data Structures & Algorithms for FREE at AlgoMap.io!

GregHogg
Автор

You should have N be bigger for a better example.

hockeymikey
Автор

The solution makes no sense, if the N would be bigger, it would not return the first error, but some other error

Nioxs
Автор

This is implemented in Git bad command, nothing beats linus trovald

rijumondal
Автор

This is used in git bisect for hunting down what commit a bug was introduced in.

talananiyiyaya
Автор

Nah, I'm too dumb for this. I'll just be a house husband or something.

hakke
Автор

class Solution:
def firstBadVersion(self, n: int) -> int:

l = 1
r = n

while l < r:
m = (l+r) // 2

is_bad = isBadVersion(m)
if is_bad == True:
r = m
else:
l = m + 1

return l

manoelramon
Автор

I just wanna ask about these level of leetcode questions. What is the lowest tier of job I can enter if I know it? Intern, part time, full time. Or like entry, junior, senior.

彩色糖果-ii
Автор

I work in meta and I can't solve this.

GPSingh-tnzo
Автор

And you wasted time when you could just use a ctrl+F in the browser lol... For real this is so non sense, a better interview process should be implemented...

gabrielbarrantes
welcome to shbcf.ru