Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Bajaj Electricals Ltd interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Bajaj Electricals Ltd
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 5 months
Topics: Data structures, Sorting, Recursion, Pointers, OOPS, Algorithms, Greedy algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Be well versed with all the coding projects on your resume.
Tip 2 : Practice questions on the above mentioned topics from popular coding websites, like geegsforgeeks, interviewbit, etc, whichever suits you.
Tip 3 : Be familiar with the job profile you are applying for, go through the requirements of that profile and focus more on the skills it requires.
Tip 4 : Some courses like data structures and algorithms, if done, would be given more preference by interviewer over other candidates.

Application process
Where: Campus
Eligibility: 7 cgpa
Resume Tip
Resume tip

Tip 1 : Mention high points during your life till now relevant to job profile.
Tip 2 : Mention internships, job experience, academics projects, coding projects precisely relevant to job profile.
Tip 3 : Review you resume by as many people as you can.
Tip 4 : Follow a proper syntax while preparing your resume.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 mintues
Interview date15 Oct 2020
Coding problem2

Silent environment

1. The Skyline Problem

Hard
15m average time
85% success
0/120
Asked in companies
Samsung R&D InstituteGoogleApple

You are given 'N' rectangular buildings in a 2-dimensional city. Your task is to compute the skyline of these buildings, eliminating hidden lines return the skyline formed by these buildings collectively. A city's skyline is the outer contour of the silhouette formed by all the buildings in that city when viewed from a distance. The geometric information of each building is given in the array of buildings where BUILDINGS[i] = [LEFT_i, RIGHT_i, HEIGHT_i]:

-> LEFT_i is the x coordinate of the left edge of the ith building.

-> RIGHT_i is the x coordinate of the right edge of the ith building.

-> HEIGHT_i is the height of the ith building.

You may assume all buildings are perfect rectangles grounded on an absolutely flat surface at height 0.

The skyline should be represented as a list of "key points" sorted by their x-coordinate in the form [[x1, y1], [x2, y2], ...]. Each key point is the left endpoint of some horizontal segment in the skyline except the last point in the list, which always has a y-coordinate 0 and is used to mark the skyline's termination where the rightmost building ends. Any ground between the leftmost and rightmost buildings should be part of the skyline's contour.

Note:
There must be no consecutive horizontal lines of equal height in the output skyline. For instance, [...,[2 3], [4 5], [7 5], [11 5], [12 7],...] is not acceptable; the three lines of height 5 should be merged into one in the final output.

As such: [..., [2 3], [4 5], [12 7],...]. 

Also, the buildings are sorted by a non-decreasing order.

For more clarification see sample case 1.
Try solving now

2. Alien dictionary

Hard
46m average time
50% success
0/120
Asked in companies
GoogleInfo Edge India (Naukri.com)Facebook

You have been given a sorted (lexical order) dictionary of an alien language.


Write a function that returns the order of characters as a string in the alien language. This dictionary will be given to you as an array of strings called 'dictionary', of size 'N'.


Example :
If the dictionary consists of the following words:-
["caa", "aaa", "aab"], and 'K' is 3.

Then, the order of the alphabet is -
['c', 'a', 'b']
Note:
If the language consists of four letters, the four letters should be the starting four letters of the English language. 

However, their order might differ in the alien language.
Try solving now
02
Round
Medium
Face to Face
Duration50 minutes
Interview date2 Dec 2020
Coding problem2

Evening
One on one interview
Interviewer was friendly by nature

1. Flood Fill Algorithm

Moderate
10m average time
90% success
0/80
Asked in companies
GoogleAppleAdobe

Ninja has found his new passion for photography. He has clicked some really good photos but in one of his images, he doesn’t like the color of a particular region. So, he decides to change the color of that region. Can you help him with this task?

The image is represented in the form of a 2D array of size M * N. Each pixel in the image is a positive integer. Ninja has given you the coordinates (row and column) of a certain pixel and the new color value. You need to replace the color of the given pixel and all adjacent same-colored pixels with the new color.

Note:
Two pixels are adjacent if they are connected to each other in any of the four directions: up, down, left, or right.

Diagonal pixels are not considered adjacent.
Example:
Consider the image of size 4*4, shown below (left). Let the coordinates of the starting pixel are (1, 2) and the new color is 8. The starting pixel, highlighted with red color, has a pixel value of 3. 

On replacing the given pixel and all adjacent same-colored pixels with the new color we get the new image, shown below (right). The modified pixels are highlighted with green color.

example

Try solving now

2. Reverse Words In A String

Easy
10m average time
90% success
0/40
Asked in companies
FacebookAppleProtiviti

You are given a string 'str' of length 'N'.


Your task is to reverse the original string word by word.


There can be multiple spaces between two words and there can be leading or trailing spaces but in the output reversed string you need to put a single space between two words, and your reversed string should not contain leading or trailing spaces.


Example :
If the given input string is "Welcome to Coding Ninjas", then you should return "Ninjas Coding to Welcome" as the reversed string has only a single space between two words and there is no leading or trailing space.
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 is a DDL command in SQL?

Choose another skill to practice
Start a Discussion
Similar interview experiences
company logo
SDE - Intern
1 rounds | 1 problems
Interviewed by Bajaj Electricals Ltd
1453 views
1 comments
0 upvotes
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by Bajaj Electricals Ltd
1223 views
0 comments
0 upvotes
company logo
Data Scientist
4 rounds | 5 problems
Interviewed by Bajaj Electricals Ltd
1552 views
0 comments
0 upvotes
company logo
SDE - Intern
5 rounds | 7 problems
Interviewed by Bajaj Electricals Ltd
1463 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
104483 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
49656 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
30954 views
6 comments
0 upvotes