Panda Guru LogoPanda
Guru

Sprinklr | Lead Product engineer

Round 1

Questions:

Given a data-structure called Point with two integers (positive) carrying X and Y coordinate for the point. P2, P6, P4, P8 Class Point { int x; int y; Point(int x, int y) { this.x = x; this.y = y; } } And an array of 9 such points arranged as depicted (horizontally and vertically aligned as shown), List<Point> points = new ArrayList<>(); points.add(new Point(1,3)); // P1 points.add(new Point(2,3)); // P2 ... points.add(new Point(3,1)); // P9 Find the total number of rectangles that can be drawn by joining the given points E.g. joining P1, P2, P5, P4 creates a rectangle (highlighted in the figure above).
Candidate's Approach

The candidate coded the solution within 20 minutes, covering all edge cases and performing a dry run with possible test cases. The interviewer agreed with the solution.

Interviewer's Feedback

The HR representative later informed the candidate that they missed some corner cases and had limited experience in software development.