Forum Posts
- 0 Answers PROGRAM
IN file system count the frequency of a word in descending order ,,,
- Rustam September 26, 2013| Flag | PURGE - 3 Answers Rotate The Matrix left by 90 degrees
As the question says, I need to take a matrix and rotate it left by 90 degrees. This is the solution I came up with. Just wanted to discuss your thoughts on this. Please feel free to point out problems if any. I welcome all your suggestions.
- Anup Saumithri September 22, 2013
And the code is
int[][] rotateLeft(int matrix[][])
{
int dim = sizeOf(matrix)/(sizeOf(matrix[0][0]) * sizeOf(matrix[0][0]));
int rotatedMatrix[dim][dim];
for(int i=0; i>0; i++)
{
for(int j=dim*dim; j>0; j-=dim)
{
*(rotatedMatrix+i+j) = *(matrix+i+j);
}
}
return rotatedMatrix;
}| Flag | PURGE - 0 Answers Java Memory Model and Synchronization
How Java Memory Model handles code reordering when synchronized keyword is used?
- Ghosh September 21, 2013
(I told that as per java specification code reorder should not happen, but he was asking more clear picture like is it possible to reorder inside the synchronized block or can not reorder with respect of out of synchronized block.)| Flag | PURGE - 0 Answers I was recently asked a algorithm question in interview at MazikPakistan
it was more of mathematical but i could not get to it...
- ameetpunshi7 September 21, 2013
Like an array A of size n...using decision tree technique prove lower bound problem on finding number of zeros in array A. :s I was like what quesiton is that :S so i just ended up sayin the lower bound will be theta(nlogn) but could not prove at that time...:S| Flag | PURGE - 0 Answers Internship interviews and job interviews
Hi, i'm a B.Tech 3rd year. Recently many companies like facebook, microsoft, samsung, amazon,directi etc visited out campus for internship recruitment. They only asked questions about algorithms and coding. What i want to know is, will the recruitment process for jobs be any different than this? I mean will they ask questions other than just asking the algorithms and coding in C++ or Will there be any questions from systems, databases etc? I read the book cracking coding interviews and it says in job interviews, most questions will be from algorithm part and they may ask about projects and a little bit of systems and other topics. But i'm not sure if they will do the same during campus interviews, can anyone please tell me if job placement interviews will be different from internship interviews?
- TheDarkKnight September 21, 2013| Flag | PURGE - 0 Answers Interview at Amazon
Hi everyone
- danielpiedrahita September 20, 2013
8 weeks ago I got a phone call from the hiring manager and he wants to give me an offer, but because of my immigration status he is looking options like send me to other location and then after one year transfer me to Seattle. because there's not more H1B visas until next year.
I'm very worried because the last time I talk with him was almost 6 weeks, I send an email to follow up the situation. but I didn't receive a reply till now. It's this mean the withdraw the offer? am I still in the process? I don't know what to think? How long I have to wait to move on?| Flag | PURGE - 0 Answers Probability
A factory produces 10 glass containers daily. It may be assumed that there is a constant probability p=0.1 of producing a defective container. Before these containers are stored they are inspected and the defectives ones are set aside. Suppose that there is a constant probability r=0.2 that a defective container is misclassified. Let X equal the number of containers classified as a defective at the end of a production day. (Suppose that all containers which are manufactured on a particular day are also inspected on that day.)
- anshul221 September 20, 2013
(1)P(X=k) = ?| Flag | PURGE - 2 Answers Interview at microsoft
Hi everyone
- muhTamer September 20, 2013
I had a Microsoft phone interview on the 6th of September and I didn't receive a reply till now. So I sent an email to my recruiter to ask her about the process, but I get an automatic reply that she will be in and out of the office starting in September-November recruiting. Is this considered a reject ???| Flag | PURGE - 0 Answers ood/oop
In a college there are various departments and subdepartments and
- vasantha.tejaswi September 19, 2013
there are some printers. There is a hierarchy for use of printers. For
example sub departments can use main department's printer. Printers are of
3 kind 1. colored laser 2. black and while laser 3. dot-matrix . Anyone
who has access to colored laser has access to other two, similarly anyone
who has access to white laser has access to dot-matrix. Write a program
which depicts this structure.| Flag | PURGE - 1 Answer codechef puzzle problem
Johnny has some difficulty memorizing the small prime numbers. So, his computer science teacher has asked him to play with the following puzzle game frequently.
- Rahul Sharma September 18, 2013
The puzzle is a 3x3 board consisting of numbers from 1 to 9. The objective of the puzzle is to swap the tiles until the following final state is reached:
1 2 3
4 5 6
7 8 9
At each step, Johnny may swap two adjacent tiles if their sum is a prime number. Two tiles are considered adjacent if they have a common edge.
Help Johnny to find the shortest number of steps needed to reach the goal state.
Input
The first line contains t, the number of test cases (about 50). Then t test cases follow. Each test case consists of a 3x3 table describing a puzzle which Johnny would like to solve.
The input data for successive test cases is separated by a blank line.
Output
For each test case print a single line containing the shortest number of steps needed to solve the corresponding puzzle. If there is no way to reach the final state, print the number -1.
Example
Input:
2
7 3 2
4 1 5
6 8 9
9 8 5
2 4 1
3 7 6
Output:
6
-1| Flag | PURGE - 1 Answer Data Structures
Real life applications of Post and Prefix evaluation?
- 4m7u1 September 12, 2013| Flag | PURGE - 1 Answer If you have an offer that you ...
If you have an offer that you have accepted, and you tell Microsoft that, they will ask you for contact details of the HR of the company whose offer you signed to contact them and ask them if its ok for Microsoft to interview you, if you dont give them details they will cancel your interview.
- Illusion September 12, 2013
Microsoft has this policy where they dont consider you as a candidate if you have signed an offer already (and they know this, you can just as easily hide it) and will ask you to re apply after 8 months.
Please be careful of what details you reveal. My personal experience, I went on site and just to come back without being interviewed because I told them I have signed an offer and the only reason why I am attending the interview is because Microsoft is the better option.| Flag | PURGE