Tip 1: Solve array and string problems.
Tip 2: Practice more aptitude questions.
Tip 1: Highlight your achievements.
Tip 2: Use strong verbs.
Aptitude, Analytical, and Logical Thinking: Fundamental and intermediate-level questions. Consistent practice is essential.
Vocabulary and Grammar: Intermediate-level questions testing language skills. Regular practice is key.
Pseudocode Challenge: Identify errors or solve problems in pseudocode. Requires a strong coding foundation and constant practice.
Technical MCQs: Questions on MS Office, cloud computing, and networking. Prepare with at least 10 mock tests due to their tricky nature.
Intermediate-level questions appear in all sections. Meeting the cutoff advances you to the next stage.
The average age of a man and his son is 28 years. The ratio of their ages is 3:1 respectively. What is the man's age?
Tip 1: Practice from the previous year's questions.
The respective ratio of radii of two right circular cylinders (A & B) is 2:5. The respective ratio of the heights of cylinders A and B is 3:1. What is the respective ratio of volumes of cylinders A and B?
Tip 1: Practice more and more
Initialize Integer x, y, z
Set y = 1, x = 2
z = x ^ y
Print z
Integer value, n
Set value = 1, n = 45
while(value less than equal to n)
value = value << 1
end loop
Print value
How can we make a C++ class such that objects of it can only be created using a new operator? If a user tries to create an object directly, the program produces a compiler error.
Method overriding can be prevented by using final as a modifier at ______.
After completing Round 1, you will seamlessly progress to the next coding round, both of which take place on the same day. During this stage, you’ll have a 45-minute window to tackle two coding questions, with the question difficulty varying from one candidate to another and from one-time slot to another. Strengthening your skills in Data Structures and Algorithms (DSA) will prove beneficial, particularly if you encounter challenging questions during your time slot. To maximize your chances of success, be sure to prepare thoroughly for the coding portion of the interview
We cannot use the element at a given index twice.
Try to do this problem in O(N) time complexity.
The Two Sum problem asks us to find two numbers in an array that sum up to a given target value. We need to return the indices of these two numbers.
Approach
One brute force approach is to consider every pair of elements and check if their sum equals the target. This can be done using nested loops, where the outer loop iterates from the first element to the second-to-last element, and the inner loop iterates from the next element to the last element. However, this approach has a time complexity of O(n^2).
A more efficient approach is to use a hash table (unordered_map in C++). We can iterate through the array once, and for each element, check if the target minus the current element exists in the hash table. If it does, we have found a valid pair of numbers. If not, we add the current element to the hash table.
An approach using a hash table:
Create an empty hash table to store elements and their indices.
Iterate through the array from left to right.
For each element nums[i], calculate the complement by subtracting it from the target: complement = target - nums[i].
Check if the complement exists in the hash table. If it does, we have found a solution.
If the complement does not exist in the hash table, add the current element nums[i] to the hash table with its index as the value.
Repeat steps 3-5 until we find a solution or reach the end of the array.
If no solution is found, return an empty array or an appropriate indicator.
This approach has a time complexity of O(n) since hash table lookups take constant time on average. It allows us to solve the Two Sum problem efficiently by making just one pass through the array.
Consider ARR = [“coding”, ”codezen”, ”codingninja”, ”coders”]
The longest common prefix among all the given strings is “cod” as it is present as a prefix in all strings. Hence, the answer is “cod”.
Initialize an empty string ans to store the common prefix.
Sort the input list v lexicographically. This step is necessary because the common prefix should be common to all the strings, so we need to find the common prefix of the first and last string in the sorted list.
Iterate through the characters of the first and last string in the sorted list, stopping at the length of the shorter string.
If the current character of the first string is not equal to the current character of the last string, return the common prefix found so far.
Otherwise, append the current character to the ans string.
Return the ans string containing the longest common prefix.
This round is mainly for checking our communication and some technical skills.
What is virtual memory? (Learn)
Tip 1: Precise response
Tip 2: Keep the tone normal
How to create empty tables with the same structure as another table?
Tip 1:Practice SQL thoroughly
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you write a single-line comment in C++?