Software Engineer / Developer Interview Questions
- 0of 0 votes
Answers3.There is a NXM grid of pixels,and each pixel is represented by 3 bits,1 each for R,G and B color values.You are given the address of beginning of grid in a character pointer,and a position x,y on the grid.You have to change that positions bits to some other given bits.
- !@# September 22, 2014 in India| Report Duplicate | Flag | PURGE
Adobe Software Engineer / Developer - 2of 2 votes
Answersint a ; int main() { printf("%u\n",&a);
}
- !@# September 22, 2014 in India
what will be the o/p of the above code if we run it 5 times, will it be same every time or not?| Report Duplicate | Flag | PURGE
Adobe Software Engineer / Developer - 0of 2 votes
AnswersDifference between a crash and exception.
- avinash September 20, 2014 in India for GTSC
Difference between macros and inline functions.
Mfc: message maps and virtual functions.
Different calling convention.
Late n early binding...
Garbage collector algorithm. When gc will fail to clean the memory.
How to know heap size, crash dump analysis, What is a stack n how to know stack memory size.
Commands in windbg.
Questions on Critical section, mutex, semaphores. Can we use mutex in single process and how?
Working of MSIL and JIT COMPILER.
Can a C# code, use c++ code and call kernel functions like createfile.
Areas: dot net, oops, operating systems, thread synchronization.
Difference in execution steps of c++ and c# code| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Assembly C++ Data Structures Debugging Object Oriented Design Operating System Threads - 1of 1 vote
AnswersGiven a array
- phoenix September 19, 2014 in United States
{{ 4,7,3,6,7}}
construct a triangle like
{{81}}
{{40,41}}
{{21,19,22}}
{{11,10,9,13}}
{{ 4,7,3,6,7}}| Report Duplicate | Flag | PURGE
Epic Systems Software Engineer / Developer - 2of 2 votes
AnswersFind the largest sum contiguous sub array. The length of the returned sub array must be at least of length 2.
- phoenix September 19, 2014 in United States| Report Duplicate | Flag | PURGE
Epic Systems Software Engineer / Developer Algorithm - 0of 4 votes
AnswersProblem Link:https://code.google.com/codejam/contest/4214486/dashboard#s=p1
- codingfunnyguy September 18, 2014 in United States
At new years party there is a pyramidal arrangement of glasses for wine. For example, at the top level, there would just be one glass, at the second level there would be three, then 6 and then 10 and so on and so forth like the following image
.
The glasses are numbered using 2 numbers, L and N. L represents the level of the glass and N represents the number in that level. Numbers in a given level are as follows:
Level 1:
1
Level 2:
1
2 3
Level 3:
1
2 3
4 5 6
Level 4:
1
2 3
4 5 6
7 8 9 10
Each glass can hold 250ml of wine. The bartender comes and starts pouring wine in the top glass(The glass numbered L = 1 and N = 1) from bottles each of capacity 750ml.
As wine is poured in the glasses, once a glass gets full, it overflows equally into the 3 glasses on the next level below it and touching it, without any wine being spilled outside. It doesn't overflow to the glasses on the same level beside it. It also doesn't overflow to the any level below next level (directly).
For example: When the glass of L = 2 and N = 2 overflows, the water will overflow to glasses of L = 3 and N = 2, 4, 5.
Once that the bartender is done pouring B bottles, figure out how much quantity in ml of wine is present in the glass on level L with glass number N.
Input
The first line of the input gives the number of test cases, T. T test cases follow. Each test case consists of three integers, B, L, N, B is the number of bottles the bartender pours and L is the glass level in the pyramid and N is the number of the glass in that level.
Output
For each test case, output one line containing "Case #x: y", where x is the test case number (starting from 1) and y is the quantity of wine in ml in that glass.| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Algorithm - 0of 0 votes
AnswersWhat is memory alignment in terms of compiler
- arpitsardhana2008 September 14, 2014 in India for networking| Report Duplicate | Flag | PURGE
Samsung Software Engineer / Developer - 0of 0 votes
Answerwhat are types of memory issues one faces
- arpitsardhana2008 September 14, 2014 in India for networking| Report Duplicate | Flag | PURGE
Samsung Software Engineer / Developer Debugging - 0of 0 votes
AnswersWrite a program to find 2 complement of number
- arpitsardhana2008 September 14, 2014 in India for networking| Report Duplicate | Flag | PURGE
Samsung Software Engineer / Developer C# - 1of 1 vote
AnswersHow can we divide a large file between multi threads to process it? If we are running a multi threaded application and input is a large file and we have to provide each thread a part of the file to make it fast. How we can achieve it in java?
- newbee September 14, 2014 in United States| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer Java - 0of 0 votes
AnswersDesign an algorithm that, given a set S of n integers and another integer x,
- m.saikiranreddy September 13, 2014 in India
determines whether or not there exist k (n>k>2) elements in S whose sum is
exactly x. Please give the running time of your algorithm| Report Duplicate | Flag | PURGE
Persistent Systems Software Engineer / Developer Algorithm - 2of 4 votes
AnswersThere is an array of 3-tuple, in the form of (a, 1, 5). The first element in the tuple is the id, the second and third elements are both integers, and the third is always larger than or equal to the second. Assume that the array is sorted based on the second element of the tuple. Write a function that breaks each of the 3-tuple into two 2-tuples like (a, 1) and (a, 5), and sort them according to the integer.
- Nobody September 11, 2014 in United States
E.g. given (a, 1, 5), (b, 2, 4), (c, 7, 8), output (a, 1), (b, 2), (b, 4), (a, 5), (c, 7), (c, 8).| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Algorithm - 0of 0 votes
AnswersConsider a MxN matrix. You are given a start element(index) and an end element. The question is to find a path from start to end. Please note that in some blocks 'X' is marked which means your path cannot go through that element. My solution was to have a tree with 4 nodes (top/left/right/bottom) and recursively check if there is a path from start to end.
- Rob September 05, 2014 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 5of 5 votes
AnswersGiven three arrays A,B,C containing unsorted numbers. Find three numbers a, b, c from each of array A, B, C such that |a-b|, |b-c| and |c-a| are minimum
- Greg September 04, 2014 in United States
Please provide as efficient code as you can.
Can you better than this ???| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm Arrays C++ Coding - 0of 0 votes
Answers1. If we have 2 column in table, user id and date which user has logged in. How can we find the user id who has logged in most. means max number of time.
- newbee September 03, 2014 in United States| Report Duplicate | Flag | PURGE
Software Engineer / Developer SQL - 0of 0 votes
AnswersGiven an array of positive and negative numbers(no zeroes),i have to arrange them in such a way that the positive and negative numbers should be arranged consecutively.The number of positive and negative numbers may not be equal i.e. if there is no positive number(or negative) left,then all the remaining negative numbers(or positive) are appended to the end of the array.The order is important i.e.if input array is { 2,-1,-3,-7,-8,9,5,-5,-7},then the output array should be {2,-1,9,-3,5,-7,-8,-5,-7}.The code is done in O(n) without using another array.I came up with a solution in which i chose 0 as pivot element and separate the numbers (using quicksort) but in this case the order is not preserved.
- sudeep.chauhan24 September 01, 2014 in India| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Arrays - 0of 0 votes
AnswersHow can we get square of a number without using * or carrot sign.
- newbee August 30, 2014 in United States| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer Algorithm - 0of 0 votes
AnswersWrite a query which return 5 persons who had spent most from a table and table contains customer id, product id and expenses. Customer id can be duplicate.
- newbee August 30, 2014 in United States| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer SQL - 0of 0 votes
AnswersThere is 3 text file, like file1.txt, file2.txt etc. Every file contains customer id, product id and expenses. Now write java code which will return 5 persons who spent most in these three files. Customer id can be duplicate all over files.
- newbee August 30, 2014 in United States| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer Algorithm - 0of 0 votes
AnswersHow can we get the square of a number without using * or carrot sign.
- newbee August 30, 2014 in United States| Report Duplicate | Flag | PURGE
Apple Software Engineer / Developer Algorithm - 0of 0 votes
AnswersDesign a thread safe hash table from ground up.
- Poison August 27, 2014 in United States for Cloud
Follow up question: How do you design it without using any locks.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 1of 1 vote
AnswersGiven a doubly linked list, copy the list.
- Poison August 27, 2014 in United States for Cloud
Edit:
Struct node{
node *pNext;
node *pPrev;
node *pRandom;
};
pRandom has connection to any random nodes.
Write a program to clone this list.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
Answerswhat all design patterns are used in designing a shopping cart and explain?
- User August 26, 2014 in United States| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Coding - 0of 0 votes
AnswersHow do you normalize shopping cart tables?
- User August 26, 2014 in United States| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Database - 0of 0 votes
AnswersPassword storage rather than storing in DB.
- User August 26, 2014 in United States| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Database - 0of 0 votes
AnswerHow the tables are stored(different tables structure)
- User August 26, 2014 in United States| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Database - 0of 0 votes
AnswersDesign a shopping cart.
- User August 26, 2014 in United States| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Java - 0of 0 votes
AnswersYou have the following function:
- debugxyahoo August 24, 2014 in Russia
F(m, n) = F(m-1, n-1) + F(m, n-1)
m, n - positive integer numbers > 0
F(1, n) = 1
F(m, 1) = 1
You need to write this function. The problem is that if x=1000000 and y=1000000, for instance, the number of recursive calls will be extremely large.| Report Duplicate | Flag | PURGE
deutsche bank Software Engineer / Developer Algorithm - 0of 0 votes
AnswersYou are given a list of items / combo_items with their price list.
- Greg August 22, 2014 in United States for Bing
And you are given list of items to buy.
Now you are asked to find which combination to buy so that it costs you minimum.
It doesnt matter if you are getting some extra items if it costs less.
Sr.No Price | Items/Combo_Items
1. 5 | Burger
2. 4 | French_Frice
3. 8 | Coldrink
4. 12 | Burger, French_Frice, Coldrink
5. 14 | Burger, Coldrink
Input Items to Buy:
Coldrink
Output(Sr.No)
3
Input Items to Buy:
Burger Coldrink
Output(Sr.No)
4
Input Items to Buy:
Burger French_Frice
Output(Sr.No)
1,2| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Algorithm - 0of 0 votes
AnswersSuppose you are a software vendor and you need to provide your API to a customer, but you don't want to give your source code. How would you do it?
- neerajlakhotia08 August 20, 2014 in India| Report Duplicate | Flag | PURGE
Adobe Software Engineer / Developer Application / UI Design