Forum Posts
- 1 Answer Find the index X in a list from where the value changes
You are given a list of integers. You can call only one method on the list:getItemAt(x), which will return the integer at the index x from the list.
- NP_learner July 06, 2013
The list starts with value 0 and it goes on to have value 0 continuously until some index. After the index the list continues to have value 1 till the end.
You do not know the size of the list. Its huge. You need to find the index from where the value 1 begins in the list.| Flag | PURGE - 2 Answers Convert Level Order Traversal to Inorder Traversal of a complete binary tree
Given the level order traversal of a complete binary tree in an array, how to find the inorder traversal of the said tree, without building up the tree. This is what I came up with.
- rowan.schildt July 01, 2013
void recurse (int *inp, int size_array, int *output, int iter_a, int &iter_b)
{
if (iter_a>=size_array)
return;
recurse (inp,size_array,output,2*iter_a+1,iter_b);
output[iter_b] = inp[iter_a];
iter_b++;
recurse (inp,size_array,output,2*iter_a+2,iter_b);
}
Is there an in-place non-recursive O(n) solution for the said problem?| Flag | PURGE - 0 Answers sudoku
write a java program to solve sudoku without using backtracking.
- vstarsun June 29, 2013| Flag | PURGE - 0 Answers Franklin Templeton or Mindtree
hi,
- saikiranvce June 29, 2013
I am Saikiran and i am very much interested in technology i have got an offer in mindtree and Franklin templeton and i've been put in to a support team in franklin templeton and mindtree not yet decided and as a fresher im confused in selecting which compay to work for.So can any help me in getting out of this.so that my career growth could be better.
Thanks in advance,
saikiran| Flag | PURGE - 0 Answers Member of technical staff (QE , automation) in VMware vs software engineer in samsung
hi,
- anonymous June 25, 2013
i have an offer from samsung as software engineer ( need to work on core java, android ) and as member of technical staff ( automation using core java, QE)... Can someone please suggest which will be good.
Samsung is not really great in work culture.
Vmware has good work life balance but its automation profile that i got here.
i am confused here....| Flag | PURGE - 8 Answers Amazon interview experience (Software development engineer - I )
Hi,
- shriranjini.s June 16, 2013
I recently attended a walk-in for Software development Engineer (SDE- 1) at Amazon, Bangalore.
Here is my experience of Amazon interview.
As I was from the same city, there was no phone interview. I have listed down all questions that I remember.
Round 1: Data Structures, Algorithms and coding (1 hour)
Interviewer just started off with questions without introduction and stuff.
1) Given a singly linked list, swap every 2 nodes, for odd number of input; retain the last node as it is.
Eg: Input: 5 13 15 18 20 11 6 7
Output: 13 5 18 15 11 20 7 6
I was asked to write the code straight-away.
Wrote the same, verified boundary cases and discussed.
2) Given a binary search tree, find the number of pairs where sum of 2 nodes’ values equal to k
Eg:
1
2 3
4 5 7
Say k=7, output =2 ( 2+5, 3+4)
Suggested an approach where I’d use inorder traversal of this,
Then interviewer asked me to solve the simplified problem, find k in sorted array instead of tree.
Got solution for this one, to have 2 pointers at each end, and traverse accordingly.
I was asked the approach for extending same to BST.
Then, I implemented the same for BST using stack.
Round 2: Data Structures, Algorithms and coding (1 hour)
1) Given input as k sorted array, generate a single sorted list as output.
Eg:
Array1: 1 5 8 9 11 ….
Array2: 2 12 24 44 …..
.
.
Array k: 3 15 79 115 ….
Output: Array1: 1 2 3 5 8 9 11 12 15 ….
Discussed the approach, and complexity, then wrote the code for the same.
2) Given a function isGreater, compare user defined objects and then return the object that is greater than all other objects.
Twist: obj1 > obj2 and obj2 > obj3 does not mean obj1>obj3
I asked for the use case for the same, as I was not convinced with the problem.
He gave an example of games/ 1 team winning another.
Discussed the approach and then wrote the code.
3) Given an input sentence, output the non repeated words in the sentence.
4) How are maps implemented?
Interviewer then clarified my questions about Amazon.
Both first and second rounds were at similar difficulty level.
If the interview feedback was bad for any of these, the candidate was eliminated. If at least 1 of these went well and other “not sure”, then too candidate is called for next rounds.
Round 3: Hiring Manager round (1 hour 40 minutes)
Discussed on my current roles and responsibilities
why do you want to join to Amazon?
What are your accomplishments in your role so far?
What are the things that you’re not good at and need to improve?
Serialization of Binary tree. Given 1 traversal is it possible to re-construct the binary tree.
Write code to reconstruct the tree given any 2 traversals.
I took in-order and post-order traversal, discussed the approach and wrote recursive solution.
Was then asked the approach for iterative.
Round4: Culture Fit Round
This surprisingly had a data structure question first.
1) Given a n (large number) lists of customers who visited n webpages on n (large number) days, design a data structure to get customers who have visited the website on exactly "k" days and should have visited at least "m" distinct pages altogether.
Was then asked to improvise the solution as much as possible
2) Details on my previous project and job profile
3) Challenging situation faced
4) Why should we hire you?
Then, he answered some of my questions.
Round5: Coding, Algorithm and data structures (Technical round with a senior developer )
Started with questions straight away
1) Least common ancestor of a binary tree (Solution and Code)
2) Given a 2 dimensional array sorted vertically and horizontally, search for an element and return true if the element is present. (Algorithm, Code and Complexity)
Example
1 5 13 29
11 16 25 38
45 49 52 57
51 54 59 66
3) Something on count sort.
4) Print binary tree in zig-zag order..
5) Gold box problem (Approach)
There are ‘n’ gold boxes placed in a row, each having different number of gold coins.
2 players play a game, where the motive is to collect the maximum number of gold coins. Each player can see how many coins are present in each box, but can get a box from either end only, on his turn.
Design a strategy such that Player1 wins (Assuming both players play smartly)
I got the hiring call after couple of days, after my last round of interview. They said feedback was very positive and they’re happy to hire me.
------------------------------------------------------------------
The books “Cracking the Coding interview” and “The Google Resume” are written very well and helped in my preparation for the interview. Thank you CareerCup !!| Flag | PURGE - 2 Answers File reading
How to read a large file efficiently in java ?
- zammer June 12, 2013| Flag | PURGE - 0 Answers Present market base compensation for Tech Lead with 5.5 years experience in India
Hi guys
- aloksmenthe June 10, 2013
Can someone help me with the current Market compensation for a Tech Lead (Mainframe) with 5.5 years of experience with a MNC ?
I want to know if I am getting underpaid.
Thanks !| Flag | PURGE - 0 Answers Adobe Acrobat - Hiring event for MTS/CS at Hyderabad
We are conducting a Hiring Event in Hyderabad at the earliest. Interested!! - Do drop in your CVs ASAP to avecdce@gmai.com
- avecdce June 10, 2013
Responsibilities
The Acrobat product development team identifies key product imperatives, conceptualizes compelling document solutions and delivers the capability in newer Acrobat and Reader releases.
As a part of this team, you will work on newer Acrobat / Reader releases on the desktop or on Acrobat integration with SaaS services or on Windows Store Apps, and work on areas such as:
Build the next generation of document creation tools
Design and build next generation of document processing tools to extract, index and search document content
Develop advanced document reconstruction algorithms for document editing, PDF Export
Develop document and image processing algorithms for creating next generation of document scanning and OCR tools
Develop next generation of intuitive and powerful document reviews, commenting and approval solutions
Develop new document protection and signing technologies
Work on Windows Store apps for Adobe PDF workflows
Architect and implement application sandboxing techniques by leveraging Windows security model and implementing processes that execute within very restrictive environments
Develop new frameworks that integrate desktop applications with SaaS services, all mostly architected cross-platform to work on multiple platforms, on devices and as services as a part of this award-winning product suite.
Requirements
1 - 8 years of hands on design / development experience
B.Tech / M.tech in computer science and engineering from a premier institute
Good understanding of object oriented design and knowledge of product life cycles and associated issues
Technical depth in operating systems, computer architecture and OS internals
Proficient in C++, data structures and algorithms
Solid programming/debugging/troubleshooting skills in system / application level
Skills in analyzing software performance and benchmarking.
Ability to work independently with strong problem solving skills
Knowledge of product life cycles is a plus| Flag | PURGE - 0 Answers Openings in Adobe
Adobe India is hiring :
- avecdce June 06, 2013
1. Engineering “Developer” positions (C/C++, Java)
2. Member Technical staff and Computer Scientists with 1 to 8 years of experience in product development with B. Tech / M. Tech in Computer Science & Engineering from a premier institute
What we need :
- B. Tech / M. Tech in Computer Science & Engineering from a premier institute.
- Minimum 1 to 8 years of hands on design / development experience.
- Excellent Credentials / Product Development Exposure.
- Good understanding of object oriented design and knowledge of product life cycles and associated issues.- Knowledge of application development on multiple platforms including various flavors of Windows and Mac.
- Should have excellent computer science fundamentals and a good understanding of architecture, design and performance.
- Must have excellent written and verbal communication skills.
Mail To: avecdce@gmail.com| Flag | PURGE - 3 Answers Looking for TRIE Qs
I hear that TRIE is becoming a popular interview Q but don't see any good questions\solutions posted here. Yes, I searched with the keyword TRIE and the results weren't very promising.
- JSDUDE June 06, 2013
Can you please point me to some good resources for TRIE (not wikipedia please...)
Thank you in anticipation.| Flag | PURGE - 1 Answer c++
why is c++ a system programing language while java not
- ashwitha93 June 06, 2013| Flag | PURGE - 2 Answers About algoritham
Need algorithm
- waghela.bhavin24888 June 01, 2013
i m having a file without space, symbols and numbers. so it will be having only characters without space and any symbols. now i want valid words from that file which will be check with dictionary and If word are valid then i want to calculate its value according to game u may know Word Scramble.| Flag | PURGE - 1 Answer Cracking the Code Interview
Brain teaser 6.4!
- SovietMafioso May 31, 2013
The solution to this on page 146 is incorrect. They state that if nobody else has a hat, then you have a hat. True. If another person has a hat, there will never be a way for you to know if you have a hat or not. C could equal 1 as the problem did not specify what would happen once all hats were removed. There is no signal to let the guys know that there are no more hats, thus no way for any person to know whether they can go into the water or not.| Flag | PURGE - 11 Answers Confusion about accepting an offer from MSFT vs YHOO
Hi All,
- gsgh May 29, 2013
I have received following two offers:
1. SDET II at Microsoft (Seattle Area, WA)
2. Senior Software Dev Eng at Yahoo (Bay Area, CA)
Compensation is almost same (factoring in the state taxes in CA). The most confusing thing is the "TEST" part in MSFT offer. I have always been a developer.
Moreover I have always worked in C++ before. The position at MSFT will require me to work in C# and Yahoo is C++/Java.
Kindly advice.| Flag | PURGE