Company: Valuelabs - Evalground

Difficulty: medium

Problem Statement

Given a 2D array, print it in anti-clock wise spiral form. Input: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Output: 1 5 9 13 14 15 16 12 8 4 3 2 6 10 11 7 Input: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Output: 1 7 13 14 15 16 17 18 12 6 5 4 3 2 8 9 10 11

More Valuelabs - Evalground OA questionsInterview experiences