Open In App

Unbxd Interview Experience for Software Engineer (On-Campus) 2023

Improve
Improve
Like Article
Like
Save
Share
Report

This article is about my interview experience at a company called Unbxd. Check out the latest technologies used by Unbxd here: https://unbxd.com/

So Unbxd came to my campus during the month of August 2022 for software engineer, data analyst, and custom service manager roles. The placement process for the software engineer role at Unbxd is as follows:

Online MCQ test: This round consisted of around 30 MCQs with topics covering data structures and algorithms, machine learning (basic), and many aptitude questions. The round lasted for 60 minutes.

I would recommend that everyone appearing for placement has solved many aptitude questions. These are the most important criteria to move to the next round.

Online Coding Test: Based on the performance of the previous test, a certain number of students will go to the next round. I was able to move mostly because I was able to solve aptitude questions correctly. The next round is a coding test. It consisted of 3 programming questions(1 easy, 1 medium, and 1 hard question) for a time limit of 75 minutes. Here is a description of the questions and an approach to solving them.

Easy question: Give a list of logs where each log consists of 151 characters consisting of the start date, start time, end date, end time, and some more information, each separated by a colon. Given a start date, start time, end date, and end time, you need to find the number of logs that are between the start and end date and time.

An Approach to the Solution

  • Extract the date and time(start and end) from each log (since I used Python, I used the method split to extract it).
  • Convert the start and end dates and times to the datetime format. (In Python, datetime(dd, mm, yy, hh, min, sec) converts to datetime format.)
  • Convert the input start and end date and time to date-time format as done in the previous step.
  • Now iterate through each log start time and end time and check if the input start time is greater than the start time and the input end time is less than the end time. Increment the counter.
  • Return the counter.

Medium question: You have an electric vehicle. There are n cities where each city has an electric charging station. You are given a list of pairs of cities with the distance between them. 1 unit of charge is required to travel 1 unit of distance. Suppose you live in City 1 and want to go to City n. Find the minimum charge you require for your vehicle at each city you travel through to reach city n. It is also given that you always have a path from city 1 to city n.

Cities with distance

Based on the figure, we see the distance between cities 1 to 2 is 3,2 to 3 is 3,1 to 3 is 5

So we need to find the minimum amount of charge that needs to be done at each city for moving from city 1 to city 3. If we move from city 1 to city 3 directly, we would need a charge of 5 units, but if we go from city 1 to 2 and then 2 to 3, the minimum charge is 3 units of charge. Hence, the answer is 3.

An Approach to the Solution: It is the same as finding the minimum distance between two cities(Dijkstra Algorithm) but with a slight modification. In Dijkstra, we store the distance from city 1 to the current city we are travelling to, but for this problem, we just store the distance between the previous city and the current city we are visiting. This is because we want the minimum distance between the previous and current city that we are travelling to, not the entire distance.

  • Create a queue(which uses properties of minheap) and a visit set(to avoid looping around)
  • Each element in the queue stores the distance between the current city and the previous city visited and the current city. Initially, it will be [0,1] City 1 with a distance of 0.
  • Perform the below iteration until you reach city N and keep track of the max or min distance between cities.
  • pop the minimum element of the queue (In python heapq.heappop(queue) gives min dist element of the queue)
  • Keep track of the maximum number of dists popped from the queue.
  • If the city is N returns the max of dist tracked 
  • else check if the city is not visited, then iterate over all adjacent cities that are not visited and store them in the queue with heapq,heappush(queue,[dist between city,city])
  • Steps 4–7 should be repeated until you reach city n.

Here is the solution in python: 

Python3




import heapq
 
 
def minCharge(dist_betweencities, N):
    adj_list_cities = {i: [] for i in range(N+1)}
    for src, dest, dist in dist_betweencities:
        adj_list_cities[src].append([dest, dist])
        adj_list_cities[dest].append([src, dist])
    res = 0
    queue, visit = [(0, 1)], set()
    while queue:
        dist, prev = heapq.heappop(queue)
        visit.add(prev)
        res = max(res, dist)
        if prev == N:
            return res
        else:
            for cur, cur_prev_dist in adj_list_cities[prev]:
                if cur not in visit:
                    heapq.heappush(queue, [cur_prev_dist, cur])
 
 
if __name__ == "__main__":
    n = 3
    arr = [[1, 2, 3], [2, 3, 3], [3, 1, 5]]
    print(minCharge(arr, n))


Hard Question: Implement a least frequently used cache(LFU cache).

The question and solution approach can be seen in the given link: https://www.geeksforgeeks.org/least-frequently-used-lfu-cache-implementation/

I wasn’t able to solve the last question as it requires a good knowledge of linked list and how the lfu is implemented. Due to time constraints, I wasn’t able to come up with a solution.

A few pointers I learned from the test:

  • Have a solid understanding of fifo, lru, and lfu caches in a question with low time and space complexity. This type of question is seen in a lot of coding and interview tests.
  • Never learn the code. Learn the approach to come up with that solution.
  • Don’t be scared if you are not able to solve even one question. Just try your best to solve at least one question. This can help your chance to get selected for an interview(not always).
  • Always check the approach to the question you weren’t able to solve, either through Google or friends, because you may never know when that same logic comes up in your next coding test.
  • Try to solve different algorithm questions, especially in graphs, trees, and arrays.
  • Make sure you can implement the solution from taking input to solving the question. Sometimes the input reading given by the editor has some mistakes.

3. Interview Round 1 (Technical round ): Based on my performance in the previous round, I was selected for the interview, which was held on the same day as the online coding test. As it was on campus, the interview was offline.

Here are a few questions asked during my interview.

  • Introduce yourself.
  • The interviewer asked about my solution approach to the questions that I was able to solve in the coding test.
  • Next, he started asking about the projects that I had listed on my resume. What was the main goal of the project? Which programming language? What improvements could you have made to your project? etc.
  • Next, he asked me a question like if there is a file consisting of log timings (each log timing has a constant distribution, that is, the difference is very small). If I give you a new log time, what will be the exact position in the file to place this? (Try to come up with a solution in o(1) complexity).
  • since I had done a lot of data science projects. He gave me a data frame and asked me a few queries to write to get the answer. I was able to do all the questions.
  • Any more questions you have for me? I asked him a few questions about the company’s flexibility, work pressure, etc.

Based on my performance in the interview, he told me I was selected for the next interview.

Interview Round 2 (System Design Round): This round started four hours after the first round due to a lot of interviews going on, and I was the first guy to be interviewed for the first round.

  • There were two interviewers, and they asked me about the projects that I did and then asked me to design a tic-tac-toe game that is extensible, meaning we can increase rows and columns, change the winning conditions, etc.
  • I began by explaining my approach to some classes (attributes and methods) and how they would be related, and then attempted to implement it in Java.The interviewer helped me in some parts to make it more flexible as my code was a bit rigid.
  • After 30 minutes of exploration and coding, he told me that it was good, but maybe a better approach could have been done. I was also not impressed.

But later, at the end of the day, I got the mail that I had been selected for the software engineer role at Unbxd. Yipee…..

A few pointers learned from the interview.

  • You have very good knowledge of the projects you have done.
  • Make sure all of your projects are uploaded to GitHub and have a good description in your readme file.
  • Have good coding skills in one programming language. (You must be able to implement all data structures, including linked lists, arrays, graphs, and trees.)
  • Try to practise a lot of system design examples(I recommend doing this if you can get selected for interviews).
  • Always be optimistic about answering questions in the interview.
  • Don’t be scared. Interviewers will help you whenever you’re stuck.

Lastly, I thank geeks for geeks for helping me share my interview experience with all the students who are trying for placements and internships. All the best to all the readers trying to get placed at a good company.

“Hope for the best, prepare for the worst.”



Last Updated : 25 Aug, 2022
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads