Software Development Manager Interview Questions
- 0of 0 votes
AnswersIn a matrix of characters, find an string. String can be in any way (all 8 neighbors to be considered), like find Microsoft in below matrix.
- varsrm November 01, 2014 in United States
A-C-P-R-C
X-S-O-P-C
V-O-V-N-I
W-G-F-M-N
Q-A-T-I-T
String Microsoft is present in the matrix above ?
There also a slight variation where a diagonal neighbor is not considered.| Report Duplicate | Flag | PURGE
Microsoft Software Development Manager - 3of 3 votes
AnswersGiven an array of object A, and an array of object B. All A's have
- hao.liu0708 October 30, 2014 in United States
different sizes, and all B's have different sizes. Any object A is of the
same size as exactly one object B. We have a function f(A, B) to compare the
size of one A and one B. But we cannot compare between two A's or two B's.
Give an algorithm to match each A with each B.| Report Duplicate | Flag | PURGE
Google Software Development Manager Algorithm - 0of 0 votes
AnswersSuppose I am given a set of input strings input[5](five of them) and their corresponding replacement strings replace[5]. Then I am given an input text, how can I replace the strings in the text matching any of the inputs with their corresponding replacements.
- mikewhity October 16, 2014 in United States
Also I have to make sure that if suppose, I find a match input[0] and I replace it by replace[0], then because of that it could be possible that I have a new match for input[2] lets say because of the new characters added by replace[0]. I don't want to make replacements with replace[2].
Also I cannot use regex of java.| Report Duplicate | Flag | PURGE
Amazon Software Development Manager Replacing multiple string occurences from a text - 0of 0 votes
AnswersSuppose you have a collection of collection
- MM February 24, 2014 in United States
Eg : CEO-> Vps-> GMs ->..
CEO will contain collection of VP's, VP's will have collection of GM's and so on.
Suppose you need to find a particular GM is the alias is given. Write a linq query to get the employee details if the employee alias is given.
Hint : Use Recursion + Linq| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Software Development Manager - 0of 0 votes
AnswersGiven a number N, now find the smallest number K such that product of digits of K is equal to N. If there is no such K then return -1.
- user124 January 27, 2014 in India
Suppose N = 100, then K = 455
N=26, K = -1| Report Duplicate | Flag | PURGE
Amazon Software Development Manager Algorithm Math & Computation - -1of 1 vote
AnswersGiven a number N, now find the number of occurrences of each digit 0..9 from 0 to N
- user124 January 27, 2014 in India
Eg:
i/p: 12
o/p:
2
5
2
1
1
1
1
1
1
1| Report Duplicate | Flag | PURGE
Amazon Software Development Manager Algorithm - 0of 0 votes
AnswersGiven a rectangular grid of N*M (1-based indexing) in which their are k monsters on k different cells.Now we need to answer Q queries in which we will be given lowest row number(L) and highest row number(H) we need to tell maximum area of rectangle between those rows that don't have a monster.(Here area of rectangle means count of cells only)
- justhack4fun688 January 05, 2014 in India
Example : Say we have a grid of 4 * 5 (mean n=4 and m=5) and monsters are located on 7(=k) cells which are (1,3) , (1,4) , (2,1) , (2,4) , (3,2) , (4,1) , (4,2) and let we have 1 query in which L=3 and H=4 then the maximum area is 6 here.
Now if the queries are very large say 10^6.Then how to tackle this problem.Is their any dynamic approach or so for doing it?| Report Duplicate | Flag | PURGE
Adobe Software Development Manager - -1of 3 votes
AnswersGiven an undirected graph with n vertices and m edges. How to check for perfect matching in the graph.(Perfect matching means each vertex has degree 1).Provide a code in c++.
- justhack4fun688 January 03, 2014 in United States| Report Duplicate | Flag | PURGE
Adobe Software Development Manager Algorithm - 1of 1 vote
AnswersThere is an array of characters, say A[ ] and there is another array of doubles of equal size say W[ ]. Need to design a method called randomChar( ) that will return a character, but the probability of returning a character at index i ie. A[i] will be W[i].
- nosyDeveloper November 22, 2013 in United States
eg. A = ['a', 'b', 'c']
W = [0.3, 0.5, 0.2]
Then randomChar() called around 100 times should return approx 30 times 'a', 50 times 'b' and 20 times 'c'.
My approach was calculating cumulative probability for the array, eg. W' = [0.3, 0.8, 1.0], then generating random number between 0 and 1 and finally looking up the cumulative array for the right range of the number using binary search. The main problem was the modifications to the normal binary search to check the correct range of generated random number.| Report Duplicate | Flag | PURGE
Yahoo Software Development Manager Algorithm - 0of 0 votes
AnswersWe maintain stock prices of various companies. A stream of stock updates are coming in the form of ticker and value pair (example YHOO, 36.00). This value needs to be updated. We have a module of GUI that always displays top 5 stock prices at any given point of time. How would you maintain these values in memory?
- nosyDeveloper November 22, 2013 in United States
My solution was to maintain a max-heap and a map that maps ticker to the corresponding node in the heap. At every update, we look-up the node and update the value, but also note if it is an increase or decrease in value. If increase, we do a sift-up, if decrease, we do a sift-down on the heap for that node. For giving the top five values at any point of time, we don't want to disturb the order in the heap so we would copy the top five levels to a different memory and then perform 5 extract and heapifies on it.| Report Duplicate | Flag | PURGE
Yahoo Software Development Manager Data Structures - 0of 0 votes
AnswersWrite an interface for HashMap.
- nosyDeveloper November 22, 2013 in United States| Report Duplicate | Flag | PURGE
Yahoo Software Development Manager Java - 0of 0 votes
AnswersWe maintain stock prices of various companies. A stream of stock updates are coming in the form of ticker and value pair (example YHOO, 36.00). This value needs to be updated. We have a module of GUI that always displays top 5 stock prices at any given point of time. How would you maintain these values in memory?
- nosyDeveloper November 22, 2013 in United States| Report Duplicate | Flag | PURGE
Yahoo Software Development Manager Data Structures - 0of 0 votes
AnswersHow do you motivate software engineers? How to you encourage quality? What are your engineering principals?
- sarahschwanbeck October 20, 2013 in United States for Y! Suite| Report Duplicate | Flag | PURGE
Yahoo Software Development Manager Behavioral - 0of 0 votes
Answerswhite a function/method to determine if two strings are anagrams. What is the time complexity of the algorithm (big O)? Is there a more efficient way?
- sarahschwanbeck October 20, 2013 in United States for Y! Suite| Report Duplicate | Flag | PURGE
Yahoo Software Development Manager Algorithm - 1of 1 vote
Answerswrite a function to determine if two strings are anagrams? what is the run-time (big O) of this? Is there a better way to do this?
- sarahschwanbeck October 20, 2013 in United States for Y! Suite| Report Duplicate | Flag | PURGE
Yahoo Software Development Manager Algorithm - -2of 4 votes
AnswersFor a technical phone screen:
- mgm.globalization July 14, 2013 in United States for International
Given a string "aaabbcccc", write a program to find the character with the second highest frequency.| Report Duplicate | Flag | PURGE
Twitter Software Development Manager Coding - 1of 1 vote
AnswersGiven a sorted array, write a function to search first occurrence of a number in the array. If not found return -1.
- piyush290490 May 27, 2013 in India
Example::
{2,2,2,3,4,5,5,6,6,8,9}
search 6
should return 7.| Report Duplicate | Flag | PURGE
Amazon Software Development Manager Algorithm - 1of 3 votes
AnswersIs this code working fine ? if yes/no give reason ?
- goelrinku90 March 29, 2013 in India
#include<iostream>
using namespace std;
struct node
{
int a;
int b;
};
typedef struct node Node;
void swap(void *a,void *b)
{
void *temp;
temp=a;
a=b;
b=temp;
}
int main()
{
Node *a1,*b1;
a1=(Node*)malloc(sizeof(Node));
b1=(Node*)malloc(sizeof(Node));
a1->a=10;
a1->b=20;
b1->a=30;
b1->b=40;
cout<<a1->a<<" "<<a1->b<<endl;
cout<<b1->a<<" "<<b1->b<<endl;
swap(a1,b1);
cout<<a1->a<<" "<<a1->b<<endl;
cout<<b1->a<<" "<<b1->b;
}
I surprised to see the ans after compiling this code ... i think u enjoy this code... :)| Report Duplicate | Flag | PURGE
Microsoft Software Development Manager - 0of 0 votes
Answerswhat is use of command line argument in software development.
- rohit March 01, 2013 in India
give any real example where we must use command line argrment (for ex- any system software,application software etc)| Report Duplicate | Flag | PURGE
IBM Software Development Manager Java - 2of 2 votes
AnswersWrite a function which compress string AAACCCBBD to A3C3B2D
- kishore February 18, 2013 in United States| Report Duplicate | Flag | PURGE
Amazon Software Development Manager Algorithm - 0of 0 votes
AnswersLarge shared HDD is synced with Cloud Server. HDD contains same files multiple times by different users. How does the cloud server manage duplicates. It can't store all the duplicates. Duplicates may not be differ by file name. Discuss algorithm.
- VillageMonkey January 17, 2013 in India| Report Duplicate | Flag | PURGE
Amazon Software Development Manager Algorithm - 0of 0 votes
AnswersGiven a BST, with nodes having a parent pointer, a pointer to a node (any node), and a value. Find the path from the given node (pointer), to the node with the given value.
- underdog December 31, 2012 in United States| Report Duplicate | Flag | PURGE
Amazon Software Development Manager Algorithm - 1of 1 vote
AnswersWhy would you chose Java of C# to build your application?
- jenish.shah October 26, 2012 in United States| Report Duplicate | Flag | PURGE
Software Developer Software Development Manager Application / UI Design - 0of 0 votes
AnswerHow do compare a case value with dynamic array of values in one case label
- Mustaq Choudhari September 17, 2012 in India
ex. select 10
case <A dynamic Array of integer >
<Do Something> break;
case 100 ....
end select| Report Duplicate | Flag | PURGE
CMC LTD Software Development Manager Application / UI Design - 0of 0 votes
AnswersGiven two trees, how do you find one of the tree is a subtree of other?
- hari@hbiz.in August 26, 2012 in India| Report Duplicate | Flag | PURGE
Amazon Software Development Manager Algorithm Data Structures Trees and Graphs - 0of 0 votes
AnswersWe have a text editor application where we can choose 1)between 100s of
- Aashish August 24, 2012 in India
different fonts like arial, calibri, etc.. 2)different text sizes 3) different formatting such as bold, Italics, regular, etc..
Imagine that the application is similar to word(there we will have these options). Now give different test cases to test this application.| Report Duplicate | Flag | PURGE
Microsoft Software Development Manager - 1of 1 vote
Answersfind longest increasing sub sequence in 2d array.
- nagyuga August 22, 2012 in United States
(bit more expl..)
ex: finding length of the snake in snake game
---------
the sequence must not be diagonally.
but it can be any like top-bootm,bottom-left-top ........
increasing means one step
ex: 10,11,12,13 (correct)
12,14,15,20(wrong)
Ex: input: consider 4x4 grid
2 3 4 5
4 5 10 11
20 6 9 12
6 7 8 40
output : 4 5 6 7 8 9 10 11 12| Report Duplicate | Flag | PURGE
Epic Systems Software Development Manager Algorithm - 1of 1 vote
Answershow to manage memory in linux kernel?
- baxiandaren July 22, 2012 in India| Report Duplicate | Flag | PURGE
Juniper Networks Software Development Manager Linux Kernel - 0of 0 votes
AnswersIn how many ways, 8 black and 8 white coins can be placed in 8x8 chess board.
- sse July 15, 2012 in United States| Report Duplicate | Flag | PURGE
Amazon Software Development Manager