Senior Software Development Engineer Interview Questions
- 1of 1 vote
AnswersPrint the bottom view of a Binary Tree.
ex-1 2 3 4 5 7 8 9 10
result is 4, 8, 5, 9, 7, 10
- teli.vaibhav May 14, 2018 in United States| Report Duplicate | Flag | PURGE
Samsung Senior Software Development Engineer Algorithm - 0of 2 votes
AnswersAll Sim characters are loaded with the same copy of your software. Imagine two of these sims are positioned somewhere on a line that extends to infinity in both directions, left and right. Using the below interface, write a C# method called "Collide" that ensures that the two sims will collide at some point in the future. Remember, the code that you write will be deployed to each Sim. You cannot write code that will be deployed to one and not the other. The method should have no parameters. You do not need to implement the ISim interface.
- IRM2708 March 22, 2018 in United Statespublic interface ISim { void MoveLeft(); // Moves the sim character one unit on the line to the left void MoveRight(); // Moves the sim character one unit on the line to the right void Relax(); // Commands the sim character to not do anything void MarkPosition(); // Puts a mark on the line at the current position of the sim character bool IsCurrentPositionMarked(); // Inspects the current position of the sim character for a mark and returns true if one is found, false if one is not found. }
| Report Duplicate | Flag | PURGE
Graphic Systems Senior Software Development Engineer .Net/C# - 0of 0 votes
AnswerYou need to design a new YouTube feature where userA is uploading a video and userB (friend of userA) gets notified for the video and wants to watch the same video in real time (i.e. even the video is not completely uploaded but we want to enable the other user to watch it).
- CoolGuy March 14, 2018 in India
How would you tackle the situation when userB wants to view the content starting from a position which is not yet uploaded.
Draw block diagram for this problem identifying the different components.| Report Duplicate | Flag | PURGE
Microsoft Senior Software Development Engineer - 0of 0 votes
AnswerGiven two positive integers represented as linked lists, provide the sum of the numbers as a linked list.
- anonymous March 14, 2018 in United States1->2->3 4->5->6 ----------- 5->7->9 1->2->3 4->5 ----------- 1->6->8 4->5->6 7->8->9 ----------- 1->2->4->5
| Report Duplicate | Flag | PURGE
Bloomberg LP Senior Software Development Engineer Algorithm - 0of 0 votes
AnswersA and B are playing a perfect 8-9 game. The rules are pretty simple. At each point, you can either insert an 8 at the end of the previous number or a 9. one 8 and one 9 forms a pair. a 9 can only be inserted if there is an 8 which does not form a pair. Perfect solution is the one which has all its numbers in pair. Find out all the possible perfect outcomes of the game in lexicographic order.
- valencia.lucky February 26, 2018 in India
Input-
Input 1: Max length of number
Output-
Your array must return an array of string s containing all possible outcomes.
Example 1:
Input: 4
Output: {"8899", "8989"}
Explanation: There can be only 2 possible outcomes out of 4 as nine must follow eight.
Example 2:
Input: 6
Output:{"888999","889899","889989","898899","898989"}
Explanation: The possible outcomes are 5.| Report Duplicate | Flag | PURGE
Wipro Technologies Senior Software Development Engineer Algorithm - 0of 0 votes
AnswersFind valid bracket from provided string. Only { [ ( are involved as brackets. A valid bracket contains with a enclose companion.
- Sat December 19, 2017 in India
Example: {} is valid, [[] Invalid
Input: {[()]}[]() Result: Valid
Input: {}[]()( Result: Invalid| Report Duplicate | Flag | PURGE
abc Senior Software Development Engineer - 0of 0 votes
AnswersGiven a List determine if contiguous elements of the List sum to an input number. For example: Array/List [6 5 3 2 1 7], and input number 8. The numbers 5 + 3 = 8. Or suppose an input number 10, the elements of the list 2 + 1 + 7 = 10.
- william.watts December 12, 2017 in United States| Report Duplicate | Flag | PURGE
Facebook Senior Software Development Engineer Algorithm - 0of 0 votes
AnswersQuestion:
- xyz December 08, 2017 in United States
* Implement a program which receives tasks, which are basically objects with "run()" method and
* a long field, where long field indicates the time after which the task should start running
* by calling the run() method
EdgeCases:
* Imagine a case, where (A,10) task A is scheduled to run after 10 seconds
* and then when at 3rd second, another task B comes where (B,2) seconds
* then which one would be executed first ?| Report Duplicate | Flag | PURGE
Google Senior Software Development Engineer - 0of 0 votes
AnswersA special number is defined as a number where, in binary notation,
- poorna.chandra.akp December 05, 2017 in India
a. has only set bits (OR)
b. all set bits are followed by unset bits (OR)
c. the sequence formed by count of the number of set bits separated by any number of unset bits is a contiguous subsequence of the sequence of natural numbers.
2, 3, 11271 and 15667135 are special numbers because their binary represenation is 10, 11, 10110000000111 and 111011110000111110111111 respectively.
2 is a special number because of condition (b).
3 is a special number because of condition (a).
11271 is a special number because its binary representation is 10110000000111 because of condition (c). The sequence of the count of number of set bits separated by a unset bits is 1, 2 and 3. This is clearly a continguous subsequence of the natural numbers.
Similarly, 15667135 is a special number. (The sequence is 3,4, 5 and 6.)
So, given two integers n and m where n <= m, find out the number of special numbers between n and m inclusive.
Input Format:
The first line of input contains an integer T where T is the number of test cases. Then T lines follow containing two space separated integers n and m where n <= m.
Output Format:
For each test case, output, in different lines, a single integer P where P is the number of special numbers between the range specified.
Constraints:
1 <= T <= 1000
1 <= n <= 10^6
1 <= m <= 10^6
n <= m
Sample Input:
4
2 10
11 15
20 30
2 100
Sample Output:
6
4
5
43| Report Duplicate | Flag | PURGE
InMobi Senior Software Development Engineer - 0of 0 votes
AnswersImplement a rate limiter attribute/decoration/annotation on top of an API endpoint. caps to N requests per minute with a rolling window (implement from scratch / test / compiling + working code. Was made to write the code in front of a computer.
- xyz November 28, 2017 in United States| Report Duplicate | Flag | PURGE
Google Senior Software Development Engineer - 0of 0 votes
AnswersBasic sales tax is applicable at a rate of 10% on all goods, except books, food, and medical products that are exempt. Import duty is an additional sales tax applicable on all imported goods at a rate of 5%, with no exemptions.
- GUL MD ERSHAD November 05, 2017 in India
When I purchase items I receive a receipt which lists the name of all the items and their price (including tax), finishing with the total cost of the items, and the total amounts of sales taxes paid. The rounding rules for sales tax are that for a tax rate of n%, a shelf price of p contains (np/100 rounded up to the nearest 0.05) amount of sales tax.
Write an application that prints out the receipt details for these shopping baskets.
Input:
1) 1 book at 12.49
2) 1 music CD at 14.99
3) 1 chocolate bar at 0.85| Report Duplicate | Flag | PURGE
ThoughtWorks Senior Software Development Engineer Object Oriented Design - 2of 2 votes
AnswersWrite a program to shuffle a deck of card?
- MM October 30, 2017 in United States| Report Duplicate | Flag | PURGE
Microsoft Senior Software Development Engineer - 0of 0 votes
AnswersSuppose you have a stock broker events that send events whenever there is an event occurs, like buy, sell etc.
- MM October 30, 2017 in United States
There are apps that needs gets these data from the events application, not all application needs all the functions.
There is broker interface that is a link between the apps and the stock application. How will you design the classes, methods etc.| Report Duplicate | Flag | PURGE
Microsoft Senior Software Development Engineer - 0of 0 votes
AnswersSupposed you have a sorted array, that was rotated like [2 4 6 7 8] => [7 8 2 4 6]. How will find an element in the array.
- MM October 30, 2017 in United States| Report Duplicate | Flag | PURGE
Microsoft Senior Software Development Engineer - 0of 0 votes
AnswerConsider a social networking site, where in each user has a number of contacts, how will you find the shortest path between 2 users who are not connected.
- MM October 30, 2017 in United States| Report Duplicate | Flag | PURGE
Microsoft Senior Software Development Engineer - 2of 2 votes
AnswersGiven an unsorted array of integers, find the length of the longest consecutive elements sequence.
- NoOne August 22, 2017 in India
For example,
Given [100, 4, 200, 1, 3, 2],
The longest consecutive elements sequence is [1, 2, 3, 4].
Return its length: 4.
Your algorithm should run in O(n) complexity.| Report Duplicate | Flag | PURGE
Uber Senior Software Development Engineer Algorithm - 1of 1 vote
AnswersGenerate all possible matched parenthesis, given n left parenthesis and right parenthesis needs to be matched.
- NoOne August 16, 2017 in India| Report Duplicate | Flag | PURGE
Uber Senior Software Development Engineer Algorithm - 0of 0 votes
AnswersCreate a data structure that stores integers, let then add, delete. It also should be be able to return the minimum diff value of the current integers.
- NoOne August 16, 2017 in India
That is,
min_diff = minimum ( | x_i - x_j | )
Example:
-1,3,4,10,11,11
min_diff = 0
-1,3,4,10,11,14
min_diff = 1| Report Duplicate | Flag | PURGE
Uber Senior Software Development Engineer Algorithm - 0of 0 votes
AnswersImplement a function that returns whether a string made of different bracket characters is well formed or not.
- JustYourAverageDev August 13, 2017 in United States
For example,
"{({})[]}" is a well formed bracket string
"{[](}" is not a well formed bracket string
Needless to say any single brackets are automatically counted as not well formed| Report Duplicate | Flag | PURGE
Eze Software Group Senior Software Development Engineer Data Structures - -7of 7 votes
Answersaa
- Anonymous July 25, 2017 in United States| Report Duplicate | Flag | PURGE
Uber Senior Software Development Engineer Coding - 0of 0 votes
AnswersA company's organizational structure is represented as
- JustYourAverageDev July 14, 2017 in United States
1: 2, 3, 4
In the above employees with id 2, 3 and 4 report to 1
Assume the following hierarchy.
1: 2, 3, 4
3: 5, 6, 7
5: 8, 9, 10
Given an employee Id, return all the employees reporting to him directly or indirectly| Report Duplicate | Flag | PURGE
Bloomberg LP Senior Software Development Engineer Coding - 1of 1 vote
AnswersGiven string a and string b, find all the occurences of the anagrams of a in b.
- local.developer July 08, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon Senior Software Development Engineer Algorithm - 0of 0 votes
Answersproducer consumer problem
- peddiz June 19, 2017 in United States| Report Duplicate | Flag | PURGE
Bloomberg LP Senior Software Development Engineer - 0of 0 votes
AnswersDefine a singleton class
- peddiz June 19, 2017 in United States| Report Duplicate | Flag | PURGE
Bloomberg LP Senior Software Development Engineer - 0of 0 votes
AnswersMake 100 HTTP GET requests to http://en.wikipedia.org/wiki/Main_Page and print the following in Java
- xyz June 09, 2017 in United States for Performance Optimization Team
statistics for the response time to stdout:
• 10th, 50th, 90th, 95th, 99th Percentile
• Mean
• Standard Deviation
Your solution must be parallel. You must make at least N (say 10, but should be configurable)
requests at a time.
Explain design choices, known limitations and edge cases.
What challenges did you face? How would you improve the code if you had more time?| Report Duplicate | Flag | PURGE
Google Senior Software Development Engineer - 0of 0 votes
AnswersWith times stored in the format "HH:MM:SS", find the number of "interesting" times that can be displayed between two given times S and T (inclusive).
- ladepu May 24, 2017 in United States for best buy
An "interesting" time is one that can be displayed with at most 2 characters.
For example S "15:15:00" and T "15:15:12" would return the count of 1 as the only "interesting" time between S and T (inclusive) is "15:15:11".
Another example, S "22:22:21" and T "22:22:23" would return the count of 3 because of the following times: "22:22:21", "22:22:22", "22:22:23"
Constraints:
S <= T
00 <= HH <= 23
00 <= MM <= 59
00 <= SS <= 59| Report Duplicate | Flag | PURGE
Senior Software Development Engineer - 0of 0 votes
AnswersGiven a Matrix A,
- GP700 May 15, 2017 in India
The rules for movement are as follows :
1. Can only move Right or Down from any element
2. Can only move within the row and column of element we start from intially.
3. You can only visit or cross an element if its value is lesser than the value of element you start from.
Find total number of elements one can visit, If one starts from an element A(i,j) where i-> row and j-> column.
Note : You have to print this output for each matrix element.
Input : Matrix
1 2 3
2 3 1
3 1 2
Output:
1 1 3
1 3 1
3 1 1| Report Duplicate | Flag | PURGE
Hackerrank Senior Software Development Engineer Data Structures Math & Computation Matrix - 0of 0 votes
AnswersFind the label with max width of a tree.
- Md Omar Faroque May 12, 2017 in United States for Amazon Business
// 0 A
// /|\
// 1 B C D
// /| | \
// 2 E F G H
Answer is 2 here.| Report Duplicate | Flag | PURGE
Amazon Senior Software Development Engineer - 0of 0 votes
AnswersYou are given an array of values, (not necessary integers or positives) and a value. You have to print all the pairs whose sum is given value. Write a general method which can accept integers, float, doubles, long, or any other thing where this make sense.
- sonesh May 08, 2017 in United States| Report Duplicate | Flag | PURGE
Bloomberg LP Senior Software Development Engineer Algorithm Coding - 0of 0 votes
Answers1) write a concurrent singleton class.
- sonesh May 08, 2017 in United States
2) Write a factory method class, and how it is used
3) Define a sealed class.
4) What if we want to replace sealed class with another class and use this new class where ever we have used our sealed class, how do you do that.
5) What would you look in a code review?
6) Do you know about adapters, bridges design pattern
7) Define async await method, how do we read data in task library
8) What are the other methods of making your call multi-threaded
9) Do you know Linq queries
10) How to make defer/no defer execution in Linq Queries.
11) Where do you use singleton class, give at least three examples
12) When we use singleton class and when static, both have the single instance.| Report Duplicate | Flag | PURGE
Bloomberg LP Senior Software Development Engineer design