Panda Guru LogoPanda
Guru

Google | onsite | India

Round 1

Questions: Given an array of length N, find the number of distinct triplets (A[i], A[j], A[k]) in the array where 0 <= i < j < k < N.

Example: A = { 1, 1, 1, 1, 2 }
Output: 2
(1, 1, 1) and (1, 1, 2).

What is the optimized approach?

Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.