New
ML System Design & SQL tracks just landed
See what's new
×
Question Bank
Pricing
Blog
Forum
HOT
Referral
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
Uber
Coding Question
AI Insights
Quick Summary
Determine if the set of values {1, ..., k} appears contiguously anywhere in the given permutation.
Return a binary string where the k-th character is '1' if k is balanced and '0' otherwise.
Solve the problem in linear time relative to the permutation length.
What This Tests
Position mapping and constant-time lookups
Span and interval properties of value sets
Iterative state maintenance without brute force
Mathematical conditions for array contiguity
Common Patterns
Hashing
Greedy
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.6-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
Output
Expected