Today I had my coderpad round with GS. We dived straight into the code. This was the first question:
A string was given. I needed to find the first non-repeating counter. If there is no such character, return 0.
Input:
asubsebusapd
Output:
e
Input:
aabbcc
Output:
0
Pretty straight-forward.
The interviewer did not ask me to optimize it. If anyone has any idea, please comment.
Second question:
https://leetcode.com/discuss/interview-question/1837465/Goldman-Sachs-or-Coderpad-or-Find-the-maximum-gold-that-can-be-collected
Third question:
https://leetcode.com/discuss/interview-question/1837497/Goldman-Sachs-or-Coderpad-or-Find-the-largest-tree
Thanks!