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

Teaching Assistant

Coding Ninjas
upvote
share-icon
1 rounds | 2 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4 months
Topics: Data Structures, Algorithms, Aptitude, OOPS
Tip
Tip

Tip 1: Must do Previously asked Interviews as well as Online Test Questions.
Tip 2: Must have good knowledge of DSA
Tip 3: Have Good Coding Profiles

Application process
Where: Coding Ninjas
Eligibility: Above 80 per in course
Resume Tip
Resume tip

Tip 1: Have Good Programming Profiles
Tip 2: Every skill must be mentioned.
Tip 3: Focus on skills, projects, and experiences more.

Interview rounds

01
Round
Medium
Online Coding Test
Duration180 mins
Interview date15 Mar 2020
Coding problem2

This round was a mix of DSA problems and debugging the codes and writing the output for problems.

1. Rearrange Linked List

Moderate
22m average time
80% success
0/80
Asked in companies
AmazonIntuitOptum

You have been given a singly Linked List in the form of 'L1' -> 'L2' -> 'L3' -> ... 'Ln'. Your task is to rearrange the nodes of this list to make it in the form of 'L1' -> 'Ln' -> 'L2' -> 'Ln-1' and so on. You are not allowed to alter the data of the nodes of the given linked list.

For example:
If the given linked list is 1 -> 2 -> 3 -> 4 -> 5 -> NULL.

Then rearrange it into 1 -> 5 -> 2 -> 4 -> 3 -> NULL. 
Problem approach

Find middle of list
Reverse second half
Use to pointers to iterate through both lists, and interleave the nodes

Try solving now

2. 9430 |

Hard
25m average time
65% success
0/120
Asked in companies
ArcesiumLinkedInApple

Given two sorted arrays 'a' and 'b' of size 'n' and 'm' respectively.


Find the median of the two sorted arrays.


Median is defined as the middle value of a sorted list of numbers. In case the length of list is even, median is the average of the two middle elements.


The expected time complexity is O(min(logn, logm)), where 'n' and 'm' are the sizes of arrays 'a' and 'b', respectively, and the expected space complexity is O(1).


Example:
Input: 'a' = [2, 4, 6] and 'b' = [1, 3, 5]

Output: 3.5

Explanation: The array after merging 'a' and 'b' will be { 1, 2, 3, 4, 5, 6 }. Here two medians are 3 and 4. So the median will be the average of 3 and 4, which is 3.5.
Problem approach

Binary search. Call 2 times getkth and k is about half of (m + n). Every time call getkth can reduce the scale k to its half. So the time complexity is log(m + n).

Try solving now

Here's your problem of the day

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

Skill covered: Programming

Which keyword is used for inheritance?

Choose another skill to practice
Similar interview experiences
company logo
Teaching Assistant
1 rounds | 1 problems
Interviewed by Coding Ninjas
678 views
0 comments
0 upvotes
company logo
Teaching Assistant
1 rounds | 2 problems
Interviewed by Coding Ninjas
747 views
0 comments
0 upvotes
company logo
Teaching Assistant
1 rounds | 2 problems
Interviewed by Coding Ninjas
908 views
0 comments
0 upvotes
company logo
Problem Setter Intern
3 rounds | 4 problems
Interviewed by Coding Ninjas
564 views
0 comments
0 upvotes