[ INFO ]category: Behavioral · Onsite difficulty: difficult freq: first seen: 2023-11-27
[DIFFICULT][ONSITE]OnsiteSWE I (Entry Level)Unknown
$catproblem.md
I had my Salesforce interview yesterday. There were four rounds in total. I will write the questions but I don't know the links for them. If anyone has them, please comment and I will update the links.
All the coding questions had to be solved on Hackerrank and they asked to pass all the test cases.
Round 1
Given the head of a linked list, return the head after deleting all the nodes which has even value.
1->2->3->4, Output: 1->3
2->4->5->6->7, Output: 5->7
A string will be encoded as follows, [a-i] will be encoded 1-9, [j-z] will be encoded as [10#-26#]. An encoded string can have repetitions of a character and its repetition count will be given in braces, as 'aaa' will be encoded as 1(3) and similarly 'aazzz' will be encoded as 1(2)26#(3). Given an encoded string return the count of every character in the original string. The original string will contain characters only from [a-z].
The count of characters in braces can be upto 10^4. The length of encoded string can be upto 10^5.
Time 55 minutes for both questions.
Round 2
Given a string which will have 2 "programmer" string in it (maybe jumbled). Return the number of characters between the boundary of those two "programmer" strings. It is also mentioned that there is no overlap between the two occurrences.
I will give few examples to make the statement more clear.
Input:
"progxrammerrxproxgrammer", here right boundary of 1st "programmer" string is 10 (we don't care about the chars in between or the order) and left boundary of 2nd "programmer" string is 13. So number of chars in between in 2 "rx".
"programmerprogrammer", right boundary of 1st "programmer" string is 9, left boundary of 2nd "programmer" string is 10. Answer is 0.
xprogxrmaxemrppprmmograeiruu, right boundary of 1st "programmer" string is 12, left boundary of 2nd "programmer" string is 15. Answer is 2.
Round 3
Design a rate-limiter.
This round lasted 1hr 15 minutes. Had to draw and explain everything on a white-board.
Round 4
Hiring Manager Round. Most difficult problem you have solved at your current company. Basic introduction.
This round lasted 20 minutes.
There is no information yet from the HR, the hiring manager told that he will let the HR know the feedback and told me I can go. Same happened with other candidates I know. Expecting to listen in a day or two.