purva7
BAN USER- 0of 0 votes
AnswersPerform left and right shift on string
- purva7 in United States| Report Duplicate | Flag | PURGE
GE (General Electric) Software Developer String Manipulation - 0of 0 votes
AnswersFind max sum of sub array.
- purva7 in United States| Report Duplicate | Flag | PURGE
GE (General Electric) Software Developer Dynamic Programming - 0of 0 votes
AnswerImplement stack using a queue.
- purva7 in United States| Report Duplicate | Flag | PURGE
GE (General Electric) Software Developer Stacks - 0of 0 votes
AnswersMerge the overlapping intervals.
- purva7 in United States| Report Duplicate | Flag | PURGE
Expedia Software Developer Dynamic Programming - 2of 2 votes
AnswersReverse the words in string eg. 'The Sky is Blue'. then print 'Blue is Sky The'.
- purva7 in United States| Report Duplicate | Flag | PURGE
Expedia Software Developer String Manipulation - 1of 1 vote
AnswersFind max sum of subarray
- purva7 in United States| Report Duplicate | Flag | PURGE
Expedia Software Developer Dynamic Programming
public boolean checkBST(Node node)
{
if(node == null)
return true;
if(node.left != null && node.right != null)
{
if(node.left.value < node.value && node.right.value > node.value)
return true && checkBST(node.left) && checkBST(node.right);
}
else if(node.left != null && node.right == null)
{
if(node.left.value < node.value )
return true && checkBST(node.left);
}
else if(node.left == null && node.right != null)
{
if(node.right.value > node.value )
return true && checkBST(node.right);
}
else
{
return true;
}
return true;
}
1) If two objects are equal, then they must have the same hash code.
- purva7 December 10, 20192) If two objects have the same hash code, they may or may not be equal.