ShareHub

Discover and share articles, posts, and links from across the web.

First and Last Occurrences

First and Last Occurrences

Delta Glacier · 3/22/2026

Problem Statement Given a sorted array arr (which may contain duplicates), find the first and last occurrences of an element x. If x is not present in the ar...

Guess Number Higher or Lower

Guess Number Higher or Lower

Volt Lynx · 3/22/2026

Problem Statement We are playing the Guess Game: I pick a number from 1 to n. You have to guess the number I picked. Each time you guess wrong, I tell you if...