Developer Program Engineer Interview Questions
- 0of 0 votes
AnswersQuestion 3)
- msankith October 30, 2011 in -
Given an crypted array obtain the original text . Should be implemented without extra space .
Eg: Crypt array : a3b4c3
decrypt array : aaabbbbccc
Imagine the array contains sufficient memory to hold the decrypt ?| Report Duplicate | Flag | PURGE
Microsoft Developer Program Engineer Arrays - 0of 0 votes
AnswersQuestion 2)
- msankith October 30, 2011 in India
Given a binary tree which contains values at each node , find whether the path exist from root to the "LEAF NODE" such that sum of the values of d path nodes is equal to the GIVEN SUM. if so return true or else return false| Report Duplicate | Flag | PURGE
Microsoft Developer Program Engineer Trees and Graphs - 0of 0 votes
AnswersIn a university, students can enroll in different courses. A student may enroll for more than one course. Both students and courses can be identified by IDs given to them. Design a data structure to store students, courses, and the student-course relationships. You can use arrays, lists, stacks, trees, graphs, etc. or come up with your own data structures. Give the running times, in Big O notation, for the following operations for your data structure and justify the answers: a) Return all students in a list. b) Return all courses in a list. c) Return all courses in a list for a given student. d) Return all students in a list for a given course.
- gupta5035 October 26, 2011 in India| Report Duplicate | Flag | PURGE
Amazon Developer Program Engineer C - 0of 0 votes
Answers]A shop sells an item in packets of 6, 9, and 17. A customer can buy any number of packets, but a packet cannot be broken up. Provide an efficient algorithm to solve the question "Can I buy N items?". For example, is it possible to buy 29 items? What about 19? Your algorithm simply needs to return true or false.
- gupta5035 October 26, 2011 in India| Report Duplicate | Flag | PURGE
Amazon Developer Program Engineer Brain Teasers - 0of 0 votes
AnswersWrite a function which traverse the whole tree and return the linked list of nodes.Your code should also be generic enough to work on any tree exp Binary tree, General tree etc.
- gupta5035 October 26, 2011 in India| Report Duplicate | Flag | PURGE
Amazon Developer Program Engineer C - 0of 0 votes
AnswersSuppose we have an array like
- newtonsright October 24, 2011 in -
1,2,3,4,5,a,b,c,d,e where we have always even number of elements.First half of the elements
are integers and second half are alphabets we have to change it to like
1,a,2,b,3,c,4,d,5,e in place i.e no use of any extra space, variables are allowed ..| Report Duplicate | Flag | PURGE
Microsoft Developer Program Engineer Algorithm - 0of 0 votes
AnswersIf have allocated an array of integers using new operator. How can the memory be freed using free(not delete) ?
- lipun4u October 21, 2011 in India
If have allocated an array of integers using malloc(not new). How can the memory be freed using delete(not free) ?| Report Duplicate | Flag | PURGE
The Digital Group Developer Program Engineer C++ - 0of 0 votes
AnswersMinimum/Maximum Sum path in A Binary Tree
- kap October 08, 2011 in India
Find and Print the Root to leaf path with minimum sum.
Finding such a path is easy bt how to print only that path..
u can not modify structure of tree node..it has a data with left and right child pointers.
Use as minimum space as possible| Report Duplicate | Flag | PURGE
Amazon Developer Program Engineer Algorithm - 0of 0 votes
AnswersImplement Smart Pointer?
- sekhar.amgoth September 26, 2011 in -| Report Duplicate | Flag | PURGE
PayPal Developer Program Engineer C++ - 0of 0 votes
AnswersThis question regarding RTTI in C++..
- sekhar.amgoth September 26, 2011 in -
How dynamic_cast work internally...| Report Duplicate | Flag | PURGE
PayPal Developer Program Engineer C++ - 0of 0 votes
Answersclass ex
- sekhar740 September 23, 2011 in India
{
int i;
public:
ex(int ii = 0):i(ii){}
~ex(){cout<<"dest"<<endl;}
void show()
{
cout<<"show fun called"<<endl;
}
};
int main(int argc , char *argv[])
{
ex *ob = NULL;
ob->show();
return 0;
}
what happens when we call show method.| Report Duplicate | Flag | PURGE
Salesforce Developer Program Engineer C++ - 0of 0 votes
AnswersHow to replace the space in the string with "ABC" without using extra memory.. string may contain some extra memory.
- sekhar740 September 23, 2011 in India
str = "i am chandu" -- str contation more memory...
str = "iABCamABCchandu"| Report Duplicate | Flag | PURGE
Salesforce Developer Program Engineer String Manipulation - 0of 0 votes
Answershow to implement stack using BST??
- hasinamjanu September 23, 2011 in India| Report Duplicate | Flag | PURGE
Samsung Developer Program Engineer - 0of 0 votes
AnswersI have two methods of an object, and they each access a critical section of code. I want to restrict access to the section so that in one method, I allow multiple threads to access the critical section. In the other method, I want only one thread to have access. If a caller calls the second method, it should lock out all clients from accessing the critical section in either of the two functions. Here is the basic structure of the class:
- KrrishDon August 10, 2011
class ClassThatNeedsFixing
{
public:
// Will allow many concurrent threads through, unless there is a
// call to the other method.
void AllowMany() {
// Here is the critical section that must be protected
...
}
// Will lock out any client, including callers to the other method.
void AllowOne() {
// Here is the critical section that must be protected
...
}
private:
// Assume there are members here that need protecting
// above.
...
};
In order to solve this problem, you are provided with two classes: Mutex and Semaphore. They have the standard behavior of the concepts that share their class names. Here are the public interfaces for each of these classes:
class Mutex
{
public:
Mutex();
void Acquire();
void Release();
};
class Semaphore
{
public:
// At it's creation, one can specify the count
// of the semaphore.
Semaphore(unsigned int count);
void Acquire();
void Release();
};
Fix the ClassThatNeedsFixing implementation so that the critical section is protected.
Your solution will be graded on flexibility and robustness (i.e., we should be able to re-use your solution in a generic case and it should be exception safe). You are allowed to create as many classes/objects/templates/etc that you need. Feel free to use the STL if necessary. Document your code as you would for real-world maintainability.| Report Duplicate | Flag | PURGE
Google Developer Program Engineer Threads - 0of 0 votes
Answersn=4 and k=3 . team name can be formed by four digits 1,2,3,4 . so n=4 now make team number using any three digits so that b1<b2<b3. Basically print numbers which are in form b1<b2<b3..e.g. 123,124,234 etc
- gubi August 09, 2011| Report Duplicate | Flag | PURGE
Zynga Developer Program Engineer - 0of 0 votes
AnswersGiven string input1, input2, remove wherever the occurrence of input2 in input1.
- Sachin Gupta August 07, 2011
e.g:
input1: skjthshetheshetesm
input2: she
input1 will become "skjththetesm"
Give the test cases.| Report Duplicate | Flag | PURGE
Google Developer Program Engineer - 0of 0 votes
AnswersThe 2020 is a number where index value is equal to number of times occurrence of index in number. for eg: for 2020
- vicky August 06, 2011
index(0)=2 (as 0 occured 2 times in 2020)
index(1)=0 (as 1 occured 0 times)
index(2)=2 (as 2 occured 2 times)
index(3)=0 (as 3 occured 0 times)
Now input given is a number, determine whether the given number posses property same as 2020 (given as example in above question)| Report Duplicate | Flag | PURGE
Global Scholar Developer Program Engineer - 0of 0 votes
AnswersWritten Round1: To get mirror image of a binary tree.
- vicky July 25, 2011| Report Duplicate | Flag | PURGE
Amazon Developer Program Engineer Trees and Graphs - 0of 0 votes
Answerswrite down the output...even after knowing , i did wrong...:P u guys be careful..:P
- Rajeev Jayaswal July 23, 2011int b=3; cout<<b++*++b<<endl;
| Report Duplicate | Flag | PURGE
Microsoft Developer Program Engineer - 0of 0 votes
Answerswhat is virtual overloading?
- khushboo taneja July 15, 2011| Report Duplicate | Flag | PURGE
IBM Developer Program Engineer C++ - 0of 0 votes
Answeruse of arrays?
- khushboo taneja July 15, 2011| Report Duplicate | Flag | PURGE
IBM Developer Program Engineer C - 0of 0 votes
Answersadvantages and need of data mining?
- khushboo taneja July 15, 2011| Report Duplicate | Flag | PURGE
IBM Developer Program Engineer Data Mining - 0of 0 votes
AnswersSelect the option that represents the definition of network database model.
- ankit July 14, 2011
Attempts to bring closer interactivity between database administrators and application programmers
Represents the entire information content of the database in only one way
Organizes the data in the form of a tree of records, with each record having one parent record and many children records
Allows each record to have multiple parent and child records, thereby forming a lattice structure| Report Duplicate | Flag | PURGE
Oracle Developer Program Engineer Database - 1of 1 vote
AnswersWhich one of the following is NOT a referential integrity issue in a relational database where the DEPT column of the EMPLOYEE table is designated as a foreign key into the DEPARTMENT table?
- ankit July 14, 2011
Updating the value of DEPT in a row of EMPLOYEE with a value that is not the primary key of any of the rows in DEPARTMENT
Inserting a new row into DEPARTMENT with a primary key that is not the value of the DEPT column of any row in EMPLOYEE
Deleting a row of DEPARTMENT
Inserting a new row into EMPLOYEE with a DEPT whose value is not the primary key of any of the rows in DEPARTMENT| Report Duplicate | Flag | PURGE
Oracle Developer Program Engineer Database - 0of 0 votes
AnswersAn organization stores its employee records in a table, “Emp”. This table has various attributes such as First Name, Last Name, Designation and Salary. The organization stores details of the employee's children in another table, “EmpChildren”. The EmpChildren table has attributes like First Name, Last Name, and Birth Date. The Emp table is a parent table and EmpChildren table is a child table. An employee may have many children, but each child will have only one parent.
- ankit July 14, 2011
From the following options, select the type of database model depicted by the above scenario.
Relational model
Network model
Hierarchical model
Object database mode| Report Duplicate | Flag | PURGE
Oracle Developer Program Engineer Database - 0of 0 votes
Answersdefine class such that you can make object of this class on a heap but not on the stack.
- prabhat July 05, 2011| Report Duplicate | Flag | PURGE
Aricent Developer Program Engineer - 0of 0 votes
Answershow to allocate memory for string of unknown/arbitrary length during execution?
- vasu July 04, 2011
.
.
modify the following code & resultant code should allocate of any given input of arbitrary length
char* getstring(){
char* s;
gets(s);
return s;
}| Report Duplicate | Flag | PURGE
Developer Program Engineer C