Tip 1: Master the Basics First.
Tip 2: Practice Mock Assessments.
Tip 1: Keep it One Page.
Tip 2: Use a Simple Format, Avoid Fancy Designs.
Tip 3: Tailor it to the Role.



Input: 'n' = 5, 'arr' = [1, 2, 3, 4, 5]
Output: 5
Explanation: From the array {1, 2, 3, 4, 5}, the largest element is 5.
Step 1: Initialize the maximum
Assume the first element is the maximum:
max_num = arr[0]
Step 2: Loop through the array
Start from index 1 and compare each element with max_num.
Step 3: Update the maximum if needed
If the current element is greater, update max_num.
Step 4: Return the maximum

Step 1: Initialize a counter
Set count = 0
Step 2: Loop through each element
For each num in arr:
Step 3: Check if the number is even
Use the modulus operator:
if num % 2 == 0:
Step 4: Increment the counter
If even, increment count += 1
Step 5: Return the counter



Step 1: Initialize an empty set to store seen elements
seen = set()
Step 2: Initialize an empty list to store unique elements in order
unique = []
Step 3: Loop through the array
For each num in arr:
Step 4: Check if num is already in seen
If not, add num to both seen and unique.
Step 5: Return the list of unique elements


The process that comes first will be executed first.
Assume all the process has arrived at same time and you have to consider the process with low process id to have arrived first.
The next process starts only after the previous gets fully executed.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
To make an AI less repetitive in a long paragraph, you should increase: