LeetCode
Experience
·
Apr 2022
·
Redmond
Microsoft | OA | Redmond, WA | Get Maximum Distance of Same Elements in an Array
3 upvotes
3,563 views
11 replies
Interview Experience
Just did an online test today for Microsoft and got this question Optimize the following code: def solution(arr): result = 0 arr_len = len(arr) for i in range(arr_len): for j in range(arr_len): if arr[i] == arr[j]: result...
Full Details
🔒
Unlock full leaked content
Full insider details, leaked discussions, and candidate experiences.
Get Premium →Topics
Arrays
Hash Table