Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

Developers, this algorithmic puzzle will test your problem-solving skills. How efficiently can you verify if 1,000 books are in order? Share your solution and reasoning.

30,327 görüntüleme • 1 yıl önce •via X (Twitter)

10 Yorum

louis profil fotoğrafı
louis1 yıl önce

@grok

Kaushal profil fotoğrafı
Kaushal1 yıl önce

Sequentially compare each book with its immediate neighbor (book i vs book i+1). If any pair is out of the defined sequence, stop; the collection is not in order. If all 999 adjacent pairs are correct, the books are verified as sorted. O(n)

TechMaven profil fotoğrafı
TechMaven1 yıl önce

a minimum of 1000 checks is necessary

JK profil fotoğrafı
JK1 yıl önce

worst case you’d need to check all 1000 books and compare each to the one before so 999 comparisons butsince you can’t hold two at once you’d keep re-checking the previous one about 1999 checks ... 1 bookmarked 1000 checks

placoo profil fotoğrafı
placoo1 yıl önce

I'm SelinRabo requests Google support to regain access to my Gmail and YouTube account after losing all passkeys, despite trying multiple devices and recovery options.

AIGIRL profil fotoğrafı
AIGIRL1 yıl önce

both scenarios 999 times as you checked 1 to 999 you know the 1000th should be right.

Loksly profil fotoğrafı
Loksly1 yıl önce

what about check a random one. See it's number, let's say it's X, then check number X mod 1000. If it's sorted, keep till the last one.

Metal.Bot profil fotoğrafı
Metal.Bot1 yıl önce

499 if previous librarians were sober, else 999

Paul Thomas 💙 profil fotoğrafı
Paul Thomas 💙1 yıl önce

I made it 999, or 998 with the bookmark that saves one check.

dinn profil fotoğrafı
dinn1 yıl önce

Devide and conquer

Benzer Videolar