I wanted to give back to this community by sharing my experience.
I applied via 3rd party recruiting agency for SDE1, for Bangalore. I found out via personal experience that Online Assesment is compulsorily done when applied through 3rd party agencies. This is not the case for referrals.
Platform used: Amcat
Section 1: 2 Coding Questions (90 minutes)
Section 2: Describe your approach section (15 minutes)
Section 3: Work style survey (15 minutes)
Question 1:
Given a list of reviews, list of competitors, topNCompetitors, return the list of topNCompetitors whose name appears most in the reviews (count competitor only once if it appears multiple times in a review).
Ex: Input:
reviews = ["newshop is providing good service in the city",
"Everyone should use newshop",
"best service by newshop",
"Fashionbeats has great service in the city",
"I am proud to have Fashionbeats",
"mymarket has awesome services",
"Thanks newshop for the quick delivery"]
competitors = ["newshop", "mymarket", "Fashionbeats"]
topNCompetitors = 2
Output:
["newshop","Fashionbeats"]All test cases passed for this, but was giving a weird Runtime error.
Question 2:
Given a list of unique "shot labels" already labelled according to their similarity, complete a function which partitions a sequence of shot labels into minimal subsequence so that a shot label only appears in a single subsequence. The output should contain the length(s) of each of the subsequences
Ex.
['a','b','a'] -> [1,1,1]
['a','b','c','a'] -> [4]
['a','b','a','b','c','b','a','c','a','d','e','f','e','g','d','e','h','i','j','h','k','l','i','j'] -> [9,7,8]I could not solve this question. Any help would be appreciated.
All the best!
Cheers!
Update:
Question similar to 1st question:
https://leetcode.com/problems/top-k-frequent-words/
Thanks to @Sithis , 2nd Question Link:
https://leetcode.com/problems/partition-labels/