Wednesday, October 12, 2022
HomeWordPress DevelopmentUber Interview Expertise for Summer season Internship (On-Campus)

Uber Interview Expertise for Summer season Internship (On-Campus)


Spherical 1 (On-line Evaluation Take a look at) – 60 minutes: The primary spherical comprised a coding check that was performed on CodeSignal. This spherical contained three questions that are given beneath,

  • Downside 1: Conversion of numbers from base 2 to base 6. Hyperlink to the issue with an identical resolution as mine: https://www.geeksforgeeks.org/convert-a-number-from-base-2-to-base-6
  • Downside 2: Given a binary string of 0s and 1s, you possibly can carry out the next operation a finite quantity (probably zero) of occasions: Select a substring of size higher than or equal to Ok and flip all of the bits of the substring. You must discover the utmost attainable worth of Ok such that after performing this operation a finite quantity (probably zero) of occasions, you can also make all of the bits of the string equal.

My Method: I devised an method involving the applying of a deque. I saved the lengths of the substrings with similar consecutive characters within the deque (001000110 -> 2 1 3 2 1). Then, till the dimensions of the deque turns into one, I popped out the minimal worth among the many rightmost and the leftmost worth and up to date the reply as reply = min(reply, N – currentMinVal), the place N is the size of the string (1 <= N <= 1e5), after which added this worth to its neighbor within the deque (2 1 3 2 1 -> 2 1 3 3 -> 3 3 3 -> 3 6 -> 9). The reply for this case can be six since 9 – 3 = 6 (N = 9) is the minimal worth amongst all of the iterations. A few of my batchmates have been in a position to clear up this utilizing binary search.

  • Downside 3: Bowling is a sport through which a participant rolls a bowling ball towards a gaggle of pins, the goal being to knock down the pins on the finish of a lane. On this problem, the foundations of the sport are barely modified. There are N numbers of pins, N is even, and the pins are organized in a horizontal line as an alternative of a triangular formation. The ith pin has the quantity arr[i] on it. In every throw, you need to knock down precisely two consecutive pins. When you knock down pins at positions iIand i+1, these at i-1 and that i+2 will grow to be adjoining. And also you’ll get arr[i-1]*arr[i]*arr[i+1]*arr[i+2] factors for knocking the ith and that i+1th pins down. If i-1 or i+2 goes out of bounds, assume that there’s a pin with the #1 at that place. Discover out the utmost variety of factors one can get when performed correctly. For the reason that reply may be giant, return the reply modulo 1e9 + 7 as output.

My Method: I don’t precisely bear in mind the constraint on N, however I feel it was round 1e2 since this drawback is a variation of the burst balloons drawback. Though I used to be in a position to determine this a lot out, I didn’t hhaveenough time to implement it. So I did a brute drive hardcoded resolution, which helped me get round half of the factors this drawback was price.

Spherical 2 (Technical Interview 1) – 45 minutes: This spherical was performed on-line on Zoom video name and CodeSignal. There have been two interviewers on the decision. On this spherical, I used to be given a LeetCode onerous drawback. Right here is the hyperlink to the issue: https://leetcode.com/issues/find-critical-and-pseudo-critical-edges-in-minimum-spanning-tree

I used to be initially requested solely to seek out the crucial edges. I gave an exponential method straight off the bat involving the technology of all attainable bushes. After some thought, I got here up with an an2 method. The method concerned first discovering the MST of the graph utilizing Kruskal’s algorithm after which discovering the MST with out contemplating the present edge for every edge. If for any edge, the worth of the MST deviates from the worth of the particular MST, then that edge is crucial. The interviewer was glad with this method and requested me to start out coding. I used to be in a position to implement the logic of the code however struggled a bit with the implementation of DSU. There have been varied foolish errors in my code, which I might resolve in the direction of the top. My code lastly labored within the final minutes, and the interviewer then requested me a follow-up query to switch my code to seek out the pseudo-critical edges. I added a situation based on which if the MST worth after eradicating the present edge didn’t change, then that edge is pseudo-critical. The interview then got here to a detailed.

Spherical 3 (Technical Interview 2) – 45 minutes: This spherical was additionally performed on-line on Zoom video name and CodeSignal. There have been once more two interviewers. On this spherical, I used to be given an OOPs query and was advised that this spherical focuses on the type of coding and the time complexities concerned don’t matter. I used to be requested to implement a knowledge construction containing all of the names, components, and costs of a restaurant’s dishes. The info construction was required to supply the next performance,

  • Add new dishes.
  • Print all of the dishes presently current.
  • Given a listing of dishes, calculate the invoice with 18% GST.
  • Given a listing of components, print all of the dishes which have no less than one ingredient in frequent with the given record.
  • Given a listing of components, print all of the dishes which should not have any frequent ingredient with the given record.

I carried out all of the performance properly utilizing courses, units, and vectors. I nonetheless had round quarter-hour left, so I used to be requested to give you extra performance,

  • Given a ultimate quantity, print any record of dishes whose worth sum up precisely to the given quantity.

I wasn’t in a position to perceive the query correctly initially. By the point I understood the query correctly, the time was almost up. Nonetheless, I used to be in a position to share my method verbally, which concerned a backtracking resolution the place for every dish, you both take the dish or don’t take the dish. The interviewer then requested me if I had any questions for him. I requested him concerning the tradition at Uber. After he completed answering, the interview got here to an finish.

Spherical 4 (Hiring Supervisor Interview) – 30 minutes: This spherical was additionally performed on a Zoom video name.

  • There was just one interviewer this time. I used to be first requested for a quick interview.
  • The dialogue then went towards initiatives. I used to be requested to decide on one of many initiatives from my resume and briefly describe it. I selected a undertaking which was based mostly on Pc Structure and described it. There have been additionally some cross-questions in between, which I might reply. The dialogue lasted for round quarter-hour, then the interviewer requested me about one other one in all my initiatives, and we mentioned that.
  • In the long run, I used to be requested a query relating to my PORs, to share some cases the place I both had helped somebody or sought assist from somebody throughout my tenure. I answered the query, and the interviewer then requested if I had any questions for him. I requested him about his journey to Uber, and he answered briefly. The interview then got here to an finish.

I obtained a proposal from Uber.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments