Quick Overview

Report four flags showing whether a target appears at an even index, an odd index, in the first half, and in the second half of an even-length list. Update all flags during one scan, allow one occurrence to satisfy multiple properties, and stop once all are set.

Report Where a Value Appears

Company: Upstart

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: easy

Interview Round: Online Assessment

Overview: Report four flags showing whether a target appears at an even index, an odd index, in the first half, and in the second half of an even-length list. Update all flags during one scan, allow one occurrence to satisfy multiple properties, and stop once all are set.

Read the full Upstart Software Engineer interview experience this question came from

Loading…