Location: San Jose, CA
Rounds: Online Assessment
Degree: MS in CS
Date: May, 2019
90 minutes Online Assessment. Test would shut itself if searched anything on web or switched windows.
Problem 1:
Given a binary string, you can transform it by toggling 1s to 0s and vice versa. You can make as many transformations as you want. Find out the maximum string weight you can get with given string as explained below:
Given 3 numbers:
Note:
Test cases:
Input: p, s, t, string = 4, 2, 1, "110"
Output: 6
Input: p, s, t, string = 4, 1, 1, "00"
Output: 3
Input: p, s, t, string = 4, 1, 1, "011"
Output: 5
Input: p, s, t, string = 4, 1, 1, "0000011"
Output: 11Problem 2: Grumpy Bookstore Owner
Couldn't solve problem 2 on time.