Tip 1 : Practice Easy+Medium
Tip 2 : Stay persistent, do not fall for setbacks
Tip 3 : Revise basic concepts and their implications
Tip 1: Only mention projects which you have knowledge about
Tip 2: Mention every small academic achievement


Let ‘ARR[]’ = [1, 2, -1] and ‘X’ = 1, ’Y’ =2 and ‘Z’ = 1. Then, for each element at index ‘i’ in the ‘ARR’:
For ‘i’ = 0, ‘ARR[0]’ = 1 and after applying the equation as ‘1 * (1 * 1) + 2 * (1) + 1‘ ‘ARR[0]’ becomes 4.
For ‘i’ = 1, ‘ARR[1]’ = 2 and after applying the equation as ‘1 * (2 * 2) + 2 * (2) + 1‘ ‘ARR[1]’ becomes 9 .
For ‘i’ = 2, ‘ARR[2]’ = -1 and after applying the equation as ‘1 * (-1 * -1) + 2 * (-1) + 1‘ ‘ARR[2]’ becomes 0.
So, ‘ARR’ after modification [4, 9, 0]. The final ‘ARR’ after sorting is [0, 4, 9].
Just an implementation question






Let say N = 2 and K = 3 and costs = [ [1,5,3] , [2,9,4] ]
In this case,
Ninja can paint house 0 into color 0, paint house 1 into color 2. Minimum cost: 1 + 4 = 5;
Or paint house 0 into color 2, paint house 1 into color 0. Minimum cost: 3 + 2 = 5 .
Assume 0 based indexing
Made a 2D DP array to save costs for every case



Input:
4 5
0 1 5
0 2 8
1 2 9
1 3 2
2 3 6

In the given input, the number of vertices is 4, and the number of edges is 5.
In the input, following the number of vertices and edges, three numbers are given. The first number denotes node ‘X’, the second number denotes node ‘Y’ and the third number denotes the distance between node ‘X’ and ‘Y’.
As per the input, there is an edge between node 0 and node 1 and the distance between them is 5.
The vertices 0 and 2 have an edge between them and the distance between them is 8.
The vertices 1 and 2 have an edge between them and the distance between them is 9.
The vertices 1 and 3 have an edge between them and the distance between them is 2.
The vertices 2 and 3 have an edge between them and the distance between them is 6.
1. There are no self-loops(an edge connecting the vertex to itself) in the given graph.
2. There can be parallel edges i.e. two vertices can be directly connected by more than 1 edge.
(Practice)
Tip 1: Learn all caching algorithms
Tip 2: Learn their usecases
(Learn)
Tip 1: list down all entities
Tip 2: Identify their actions and interactions
Tip 3: Note the above things down before implementation

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?