Tip 1 : Practice Atleast 250 Questions
Tip 2 : Ex- Do atleast 2 projects
Tip 1 : Mark skills with Bold letters.
Tip 2 : Mention projects on resume
- Morning time
- Environment was good.
- No
- Interviewer was good




In figure 1 : friend-1 has to pay 2000$ to friend-2, and 4000$ to friend-3 and friend-2 has to pay 3000$ to friend-3.
In figure 2 : so we can minimize the flow between friend-1 to friend-2 by direct pay to friend-1 to friend-3

‘N’ = 2
‘K’ = 2
‘A’ = {2, 3, 1}
On the 1st date, they can go to restaurant 1 or restaurant 2.
On the 2nd date, they can go to restaurant 2 or restaurant 3.
The possible combination of restaurants:
‘1’ and ‘2’ on 1st date and 2nd date respectively = 2 + 3 = 5
‘1’ and ‘3’ on 1st date and 2nd date respectively = 2 + 1 = 3
‘2’ and ‘2’ on 1st date and 2nd date respectively = 3 + 3 = 6
‘2’ and ‘3’ on 1st date and 2nd date respectively = 3 + 1 = 4
Maximum Total number of coins = max(5, 3, 6, 4) = 6



For the test case:
N = 3, Q = 2
Edge 1 connects 0 and 1
Edge 2 connects 0 and 2
battles = [1, 2]
The king has to visit first city 1 and then city 2. To visit city 1, he has to travel 1 unit, and now he is in city 1. To visit city 2 from city 1, he has to travel another 2 units. So overall, he has to travel 3 units of distance.



1. All gardens have at most three paths coming into or leaving the garden.
2. There can be more than one possible answer to this question. You need to print the smallest valid answer when all possible answers are sorted in lexicographical order.



For N = 3 one valid array is [3,1,2,1,3,2].

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Which SQL clause is used to specify the conditions in a query?