Panda Guru LogoPanda
Guru

Fungible Amazon OA

Round 1

Questions: Q - Find the longest substring in a string that has a same length (but not exactly same) anagram (these are called perfect anagrams) in the same string.

Example 1: s = "cabcab"
ans = 3
Explanation:
("cab", "bca"), ("abc", "bca") are two such 3 length substrings.

Example 2: s = "aabbcc"
ans = -1
Explanation: There are no perfect anagrams. a & a, b & b, c & c are exactly the same.

Also, 1 < len(s) <= 10^5.

Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.