Spinny interview experience Real time questions & tips from candidates to crack your interview

Software Developer

Spinny
upvote
share-icon
2 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 0.3 months
Topics: Data Structures, Algorithms, Recursion, Dynamic Programming, Django Technical Questions
Tip
Tip

Tip 1 : Keep practicing DSA questions.
Tip 2 : Technical Knowledge of Framework on which you're working
Tip 3 : Backend questions like different types of HTTP requests.

Application process
Where: Other
Resume Tip
Resume tip

Tip 1 : Have a good story behind everything in your resume. Don't put anything not done by you.
Tip 2 : Mention work experience in detail and what all have you done there.

Interview rounds

01
Round
Medium
Online Coding Test
Duration75 minutes
Interview date14 May 2022
Coding problem3

3 coding questions were there in the online test.

1. Search In Rotated Sorted Array

Easy
12m average time
85% success
0/40
Asked in companies
OYOZSAmazon

You have been given a sorted array/list 'arr' consisting of ‘n’ elements. You are also given an integer ‘k’.


Now the array is rotated at some pivot point unknown to you.


For example, if 'arr' = [ 1, 3, 5, 7, 8], then after rotating 'arr' at index 3, the array will be 'arr' = [7, 8, 1, 3, 5].


Now, your task is to find the index at which ‘k’ is present in 'arr'.


Note :
1. If ‘k’ is not present in 'arr', then print -1.
2. There are no duplicate elements present in 'arr'. 
3. 'arr' can be rotated only in the right direction.


Example:
Input: 'arr' = [12, 15, 18, 2, 4] , 'k' = 2

Output: 3

Explanation:
If 'arr' = [12, 15, 18, 2, 4] and 'k' = 2, then the position at which 'k' is present in the array is 3 (0-indexed).


Problem approach

1. Calculate the total sum of all the elements in the array and store it in totalSum. O(n)
2. Maintain a variable leftSum and initialise it to 0.
3. Iterate over the array, add the current element to leftSum.
4. Check if leftSum = totalSum-(currentElement + leftSum)
5. If yes, this is the pivot index.
6. If not index if found return -1

Try solving now

2. Maximum of All Subarrays of Size K

Easy
15m average time
85% success
0/40
Asked in companies
SprinklrMicrosoftAmazon

You are given an array “A” of N integers. Your task is to find the maximum element in all K sized contiguous subarrays from left to right.

For Example:
If A = [3, 2, 3], and K = 2.
Then max of [3, 2] = 3 and max of [2, 3] = 3
So, the answer will be [3, 3]

If A = [3, 2, 3, 5, 1, 7] and K = 3.
Then max of [3, 2, 3] = 3 
Then max of [2, 3, 5] = 5 
Then max of [3, 5, 1] = 5 
Then max of [5, 1, 7] = 7 
So  the answer will be [3, 5, 5, 7]
Follow Up :
Can you solve the problem in O(N) time complexity and O(K) space complexity?
Problem approach

1. I used Deque to solve the problem.
2. q = deque()
3. q is a monotonically decreasing queue where q[0) will always be the max
4. Initialise high = 0
5. Run a while loop till high < len(array)
6. Top of queue will contain the maximum element in the array of size k.
7. Evict from queue when needed.

Try solving now

3. Segregate Odd-Even

Moderate
25m average time
75% success
0/80
Asked in companies
Wells FargoThought WorksMicrosoft

There is a wedding ceremony at NinjaLand. The bride and groom want everybody to play a game and thus, they have blindfolded the attendees. The people from the bride’s side are holding odd numbers and people from the groom’s side are holding the even numbers. For the game to start quickly, all the bride’s side people should come first, followed by the groom’s side people in the same order.

The attendees of the wedding with their numbers are given in the form of a Singly Linked List, arranged randomly.

A singly linked list is a type of linked list that is unidirectional; that is, it can be traversed in only one direction from head to the last node (tail).

Example:
The attendees holding numbers from 1, 4, 3 are shown: 

As the organizers are busy, you have to arrange all the people by arranging the bride’s side people first followed by the groom’s side people sequentially.

Note:
For the above example 1 -> 4 -> 3, 1 -> 3 -> 4 is the only correct answer, i.e nodes should be grouped sequentially. Hence, 3 -> 1 -> 4 is the wrong answer as we have to preserve the same order.
Problem approach

1. Use two pointer approach. Maintain two pointers, first and last.
2. Initialise first to 0 and last to n-1
3. Swap first and last elements when needed.

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date21 May 2022
Coding problem4

Interview Vector was taking the round on behalf on Spinny. It was two questions on technical knowledge and coding round.

1. Sub-Arrays With Odd Sum

Easy
20m average time
80% success
0/40
Asked in companies
AmazonSnapdeal Ltd.Spinny

You are given an array ‘ARR’ of size ‘N’. Your task is to find the total number of sub-arrays with an odd sum. The sub-array is a contiguous part of an array. For example, consider the array [1, 2, 3], There are 6 non-empty sub-arrays. The sub-arrays are [1], [2], [3], [1,2], [2,3] and [1,2,3].

Try solving now

2. System Design

Given a stream of data coming from an online game portal, every entry looks like this
User_id, timestamp, score
U1, 12:00pm, 2
U2, 13:00pm, 3
U1, 13:02pm, 2
U3, 14:03pm, 4
Need to figure out the sum of scores in the last one hour
Question was how will we process huge amount of data and update the sum of scores at every hour interval.

Problem approach

Tip 1 : I suggested Using asynchronous task to process this data and store it in the database
Tip 2 : Whenever the sum of scores is required we can query the data from the database.
Tip 3 : Above solution consisted of inaccuracies.

3. Operating System

  1. What is MVC in Django
Problem approach

Tip 1 : Have technical knowledge of the frameworks you're currently using.

4. Project Related Questions

  1. What are you currently doing in your company?
  2. Explain the project you have on your resume.
Problem approach

Tip 1 : Don't lie on your resume and have a story to support everything present there.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
SDE - 1
3 rounds | 4 problems
Interviewed by Spinny
1663 views
0 comments
0 upvotes
SDE - 1
3 rounds | 6 problems
Interviewed by Spinny
3106 views
7 comments
0 upvotes
SDE - 1
3 rounds | 4 problems
Interviewed by Spinny
1527 views
0 comments
0 upvotes
SDE - Intern
2 rounds | 2 problems
Interviewed by Spinny
856 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Developer
5 rounds | 14 problems
Interviewed by Microsoft
3931 views
1 comments
0 upvotes
company logo
Software Developer
6 rounds | 12 problems
Interviewed by SAP Labs
2806 views
0 comments
0 upvotes
company logo
Software Developer
3 rounds | 3 problems
Interviewed by Amazon
1133 views
0 comments
0 upvotes