Question from my last OA, Infeneon
Question · Posted Jul 2025
The permutation problem Given N+1 numbers that are a permutation of the numbers 1 through N, with one integer occurring twice. N is always even. You need to create a 2D grid with N rows and 2 columns such that by traversing through it, you can recreate the given sequence of N+1 numbers. You can only move to a neighboring cell that shares a side or corner with the current cell. You can revisit the same cell multiple times. ...
The full answer & interview discussion are available to premium members.
Log in Create a free account