Tech India Line Interview Question
Software Engineer / DevelopersCountry: India
Interview Type: Written Test
is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.
CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.
Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.
Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.
get the words from paragraph by searching for blank spaces and store the words in vector or binary tree.
If you use vector then run a loop through the vector search for same words.
If use binary tree for storing words, you can arrange words around the root..example
"RAM is a boy. Ram is a Great boy"
make ROOT= "RAM"
and arrange words in binary tree like this
if(root->data>newData)
{
//insert at left
}
else if(root->data<newData)
{
//insert at right
}
else if(root->data==data)
{
//same word found, store this in some global vector
}
Hence using Binary tree will save you resource of looping for every word in vector used for storing data.
code for creating tree modify this for storing paragraph and add check for EQUALS while creating tree.
- Nik March 28, 2012