jayesh30785
BAN USER
Questions (2)
Reputation 0
- 0of 0 votes
AnswersFind the best seat selection in online ticket booking system?
- jayesh30785 in India
For example if you want to book 5 seat, best selection is 5 consecutive seat. But if 5 consecutive seat is not available it select (3,2) because (4,1) is not a best solution,
same like if you want to book 10, if not available (8,2), (7,3), (6,4), (5,5)
You can assume seat arrangement is 2D matrix, where already book seat is 1, and available seat is 0.| Report Duplicate | Flag | PURGE
- 0of 0 votes
Answersgive a binary tree (not BST)where tree node, with extra pointer inorder-successor, initaliy all inorder-successor pointer set to NULL.
- jayesh30785 in India
write a code to set all pointer to its inordersuccessor.
struct Node
{
int data;
Node *left, *right;
Node *successor;
};| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures Trees and Graphs Algorithm
Page:
1
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.