Panda Guru LogoPanda
Guru

Amazon recent interview question for SDE1

Round 1

Questions: We are given a string s, what is the length of the longest pair of perfect anagrams from the substrings of s.
Example: For s = "abcacb", these pairs for perfect anagrams could be formed ("bc","cb"), ("ca","ac"), ("abc","acb"),("bcac","cacb"). And the length of the longest pair is 4 (i.e ("bcac", "cacb") pair).
The constraint is 1 <= len(s) <= 10^5.

Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.