← Back to experiences
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/experiences/…$
Level: Intern
Round: Online Assessment · Type: Coding · Difficulty: 6/10 · Duration: 120 min · Interviewer: Unfriendly
Topics: Arrays, Permutations
Location: San Francisco, CA
Interview date: 2026-01-23
I completed an online assessment consisting of three coding problems. The problems seemed to be drawn randomly from a question bank.
The coding question I got was:
Give one permutation p of 1...n, a number k (1<=k<=n) is balanced if there is a subarray p[l...r] such that the subarray is a permutation of 1..k. Find out if k is balanced for every k and returns a binary string.
My approach:
Interval with min/max index tracking.