skt
BAN USER- 0of 0 votes
AnswersA transaction involves transferring amount from one account to another account.There is one queue being populated with transaction requests . Use 4 threads to process requests. Ensure data consistency and fastest way to process the requests .
- skt in India
Given:
1. request will contain fromAccount, toAccount, amount 2. list of n account which are involved in transactions.| Report Duplicate | Flag | PURGE
Barclays Capital
In this case, we do not need to construct the BST.
1. If both arrays' values and their ordering patterns with in each array is same, both arrays would construct similar BST. O(n).
2. If values are not identical but both arrays follows similar ordering pattern , structure will be same but not the values. ex: A1: 1,2,3 n A2: 4,5,6 or A1: 9,5,11 or A2: 3,1,4 ...structures of two BSTs in each example would be same but not the values.
I think question comes down to ensuring same size, similar values , and similar ordering pattern among values of each array.
- skt February 21, 2013