Student Interview Questions
- -3of 3 votes
Answershow to redirect the url to the custom url after the successful completion of the payment in the emppay gateway
- Nasibnba April 03, 2014 in India| Report Duplicate | Flag | PURGE
Student student - 0of 0 votes
AnswerOperation :Deleting element in the binary search tree(Without linked list) I'm trying to implement a pseudo-code but operation not implemented.can cause?(If you want I can write a pseudo-code.)So,delete operation is not happening for BST.can cause?-1 is null element in array. Linked list is not be for this code.
- maxflow34 March 11, 2014 in turkiye
void deleting(int *Tree,int element){
int temp=0;
while((Tree[temp]!=element) && (Tree[temp]!=-1)){
/*loop until the element is found*/
if(element<Tree[temp])
temp=2*temp+1;
else
temp=2*temp+2;
}
if(Tree[temp]!=1)/* if the element is found*/
/*case1 - Delete leaf node*/
if((Tree[2*temp+1]==-1) && (Tree[2*temp+2]==-1))
Tree[temp]=-1
/*case 2- delete node with one child*/
else if((Tree[2*temp+1]==-1)|| (Tree[2*temp+2]==-1)){
if(Tree[2*temp+1]!=-1) /* is the child in the left of temp*/
preOrder((2*temp+1),Tree);
else
preOrder((2*temp+2),Tree);
}
/*case 3-delete node with 2 children*/
else if {
int inOrder_N=2*temp+2 /* inorder successor is surely in the right sub tree*/
while(Tree[2*inOrder_N]!=-1)
inOrder_N=2*inOrder_N;
Tree[temp]=Tree[inOrder_N]; /* replace with inorder successor*/
if(Tree[2*inOrder_N+2]==-1);/* inorder successor has no child*/
Tree[inOrder_N]=-1;
else /* inorder successor has no child*/
preOrder(((2*inOrder_N)+1),Tree)
}
else
printf("element not found");
}
void preOrder(int node, int *bst,int n){
if(node<n){
printf("Node : %d - Value : %d \n",node,bst[node]);
preOrder(2*node+1,bst,N);
preOrder(2*node+2,bst,N);
}
return;
}| Report Duplicate | Flag | PURGE
unknown Student student Algorithm - -1of 1 vote
AnswersWrite a recursive Method int shortestPath(int start, int end) in Java which returns the length of the shortest Path between start and end.
- nuni March 04, 2014 in Germanypublic class GraphMatrix { public GraphMatrix(int iNrOfNode){ m_Matrix = new boolean[iNrOfNodes][iNrOfNodes]; } private boolean[][] m_Matrix; }
| Report Duplicate | Flag | PURGE
Amazon Student student Algorithm - -14of 14 votes
AnswersIdea student
- manojsainitoda February 22, 2014 in United States for single| Report Duplicate | Flag | PURGE
Facebook Student student Ideas - -12of 12 votes
AnswersI idea student for facebook.
- manojsainitoda February 22, 2014 in United States for single| Report Duplicate | Flag | PURGE
Facebook Student student Ideas - 0of 0 votes
AnswersWrite a function which checks a Red-Black-Tree that the max depth isn't > than 2* min depth. It must return a boolean.
- nuni February 17, 2014 in Germany
boolean checkdepth(){}
no class variables| Report Duplicate | Flag | PURGE
Amazon Student student Algorithm - 0of 0 votes
AnswersThe way a Knight Given a chessboard, consisting of n×n cells, several of them are cut. Find the path of minimum length for a Knight from one cell to another. The Knight can’t go through cut cells.
- anas.love19 December 27, 2013 in United States
Specifications
Input
The first row is set to the number n (2 ≤ n ≤ 50). Each of the next n lines contains n symbols. The symbol # denotes the cut cell, the point - not cut cell, the symbol @ denotes the initial and final cell of the Knight's path (the chessboard contains two such characters).
Output If the path can not be constructed, print "Impossible". Otherwise display the same map as the input, but check all Knight intermediate positions with symbol @. Example
Example input
5
.....
.@@..
.....
.....
.....
5
@..@.
..##.
.....
.....
.....
5
@....
..#..
.#...
.....
....@
Example output
Sample 1
...@.
.@@..
....@
.....
.....
Sample 2
@..@.
..##.
.@..@
..@..
@....
Sample 3| Report Duplicate | Flag | PURGE
Student student C++ - -1of 1 vote
Answerscreate a java api for mood detection for the image captured from webcam with approximate indexing
- kapooraniket2606 October 11, 2013 in India| Report Duplicate | Flag | PURGE
Student student Software Engineer / Developer - 0of 0 votes
AnswersIf you are going to debug a program with about 5000 lines of codes (written in C), given that some of its features are working fine while other are not, how are you going to fix it?
- liangzhenxiangsysu May 23, 2013 in United States| Report Duplicate | Flag | PURGE
Student student C - 0of 0 votes
AnswersThere is a class
- Anonymous March 26, 2013 in United States
class vehicle
{
int door_numbers;
obj colour;//another class has int members Red, Green,Blue
bool has_ac;
}
there is a huge list of data of vehicles, the number of doors may vary to 1-million (imaginary vehicle :) ).
there may be millions of colors.vehicle may or may not have AC. How would you save this such that any combination
(say all blue cars with ac having 6 doors) may be accessed easily.
Discuss algorithm, complexity and testing strategy| Report Duplicate | Flag | PURGE
Student student Student student Algorithm Data Structures - 0of 0 votes
AnswersGiven a 2D binary array (2D array of 0's and 1's) with 'm' rows and 'n' columns, give an efficient algo to find area of the largest sub array(rectangle) consisting entirely of 1's.
- sneha February 06, 2013 in India| Report Duplicate | Flag | PURGE
Student student Student student Algorithm - 0of 0 votes
AnswersWhen i use the <input type="file"/> in HTML how do i save the complete path of the file chosen into a javascript variable
- vinaym5891 November 19, 2012 in India| Report Duplicate | Flag | PURGE
Student student - 0of 0 votes
Answersdraw the flow chart for an XOR cipher program using the
- pastorbt November 16, 2012 in United States
C programming language.
Your program must accept as input from the user a value between 0 and 255 to be used as the
secret key, the name of the input file and the name of the output file. No line in the input file
should contain more than 4096 characters.
After the user would have provided their secret key, your program should read and perform an
XOR cipher on the contents of the input file and write the result to the output file.
If the input file has already been encrypted and the identical secret key that was used to
perform the initial encryption is provided, then the contents of the output file should be
deciphered into its original plain text.| Report Duplicate | Flag | PURGE
Student student Student student - 0of 0 votes
Answerswrite the algorithm for an XOR cipher program using the
- pastorbt November 16, 2012 in United States
C programming language.
Your program must accept as input from the user a value between 0 and 255 to be used as the
secret key, the name of the input file and the name of the output file. No line in the input file
should contain more than 4096 characters.
After the user would have provided their secret key, your program should read and perform an
XOR cipher on the contents of the input file and write the result to the output file.
If the input file has already been encrypted and the identical secret key that was used to
perform the initial encryption is provided, then the contents of the output file should be
deciphered into its original plain text.| Report Duplicate | Flag | PURGE
Student student Student student Algorithm - 0of 0 votes
AnswersHow to write an XOR cipher program using the
- pastorbt November 16, 2012 in United States
C programming language.
Your program must accept as input from the user a value between 0 and 255 to be used as the
secret key, the name of the input file and the name of the output file. No line in the input file
should contain more than 4096 characters.
After the user would have provided their secret key, your program should read and perform an
XOR cipher on the contents of the input file and write the result to the output file.
If the input file has already been encrypted and the identical secret key that was used to
perform the initial encryption is provided, then the contents of the output file should be
deciphered into its original plain text.| Report Duplicate | Flag | PURGE
Student student Student student C - 0of 0 votes
AnswersHow to write an XOR cipher program using the C programming language.
- pastorbt November 08, 2012 in GUYANA
Program must accept as input from the user a value between 0 and 255 to be used as the secret key, the name of the input file and the name of the output file. No line in the input file should contain more than 4096 characters.
After the user would have provided their secret key, your program should read and perform an XOR cipher on the contents of the input file and write the result to the output file.
If the input file has already been encrypted and the identical secret key that was used to perform the initial encryption is provided, then the contents of the output file should be deciphered into its original plain text.
Show:
1, Algorithm and flow chart
2, Source code.
Anyone with a clue to this task?| Report Duplicate | Flag | PURGE
Student student Student student C - 0of 0 votes
Answerprogram to get n number of input and change it as 2 power n+1 and find whether the number is prime or not
- rbhavya62 November 05, 2012 in India| Report Duplicate | Flag | PURGE
Student student Java - 0of 0 votes
Answersprogram to get a list of arrays like 121 121 121 and eliminate duplicate and print 121 as output
- rbhavya62 November 05, 2012 in India| Report Duplicate | Flag | PURGE
Student student Java - 0of 0 votes
Answersprogram to print only alphabets by getting input as j@1vu etc
- rbhavya62 November 05, 2012 in India| Report Duplicate | Flag | PURGE
Student student Java - 0of 0 votes
AnswersDesign a O(n) algo for following scenario: Given a n-element array, n being even, find atleast (n/2) distinct element pairs that when summed is divisible by an integer k. eg: (a,b);(b,a) not allowed & (a+b)%k==0
- psadhukhan07 November 04, 2012 in India| Report Duplicate | Flag | PURGE
IIT-D Student student Algorithm - 1of 1 vote
AnswersFor a given integer X, consisting of not more than 6 digits, write the value of the largest palindrome smaller than X and the value of the smallest palindrome larger than X to output.
- pastorbt October 31, 2012| Report Duplicate | Flag | PURGE
Student student Student student C - 0of 0 votes
AnswersGiven an O(v+e) time algorithm to compute the path in a connected in unidirectional graph that traverse each edge in each direction exactly once.Describe how u can find ur way out of the maze if u r given a large supply of pennies.using JAVA
- mayankbitmesra October 19, 2012 in India| Report Duplicate | Flag | PURGE
Student student Student student Java - 0of 0 votes
Answersassume that dictionary has only 5 words...
- vikashanand338 October 17, 2012 in United States
APPLE,APE,BABY,BALL,CAT
write a program which will accept a string and list all possible words in the dictionary which start with that string.use binary trees for fast retreival in java| Report Duplicate | Flag | PURGE
Google Student student Java - 0of 0 votes
Answersassume that dictionary has only 5 words...
- vikashanand338 October 13, 2012 in United States
APPLE,APE,BABY,BALL,CAT
write a program which will accept a string and list all possible words in the dictionary which start with that string.use binary trees for fast retreival in java| Report Duplicate | Flag | PURGE
Student student Student student Java - 0of 0 votes
Answersgiven string is of the form "abcd1234defgh8965" then output should be "a1b2c3d4 d8e9f6g5" with O(n) time??
- rajeshanji8 October 02, 2012 in India| Report Duplicate | Flag | PURGE
Microsoft Student student Data Structures - 0of 0 votes
AnswerWrite a program to identify the name of current city where you are using IP addresses.
- kakani.shrikant September 11, 2012 in United States| Report Duplicate | Flag | PURGE
ASU Student student Java