Region | Key Differences |
---|---|
India | - Heavy focus on coding tests for freshers - Group discussions (GD) sometimes included |
USA/Canada | - More case studies for consulting roles - Leetcode-style coding rounds |
Europe/UK | - Strong emphasis on language skills (for some roles) - More behavioral rounds |
Japan | - Japanese language proficiency often required - Cultural-fit interviews |
Freshers: Bachelor’s/Master’s in CS, IT, BCA, MCA, or related fields.
Experienced Hires: 2+ years in relevant domain (IT, consulting, cloud, etc.).
GPA/CGPA: Varies (usually ≥60% or 6.0+ CGPA).
Aspect | Freshers | Experienced |
---|---|---|
Process Focus | Coding + Aptitude | System Design + Leadership |
Interview Rounds | 3-4 | 4-5 |
Salary Range (Approx.) | 70K (varies by region) | 150K+ |
#include <iostream>
int hcf(int a, int b) {
while (b) {
a %= b;
std::swap(a, b);
}
return a;
}
int main() {
int num1, num2;
std::cout << "Enter two numbers: ";
std::cin >> num1 >> num2;
std::cout << "HCF of " << num1 << " and " << num2 << " is: " << hcf(num1, num2) << std::endl;
return 0;
}
hcf
that uses the Euclidean algorithm to find the HCF of two integers. The main
function takes two numbers as input and prints their HCF. OOP is a programming paradigm based on the concept of "objects," which can contain data, in the form of fields (often known as attributes or properties), and code, in the form of procedures (often known as methods). Key features of OOP include:
void
). A class can have multiple constructors with different parameters (constructor overloading). If a class does not explicitly define a constructor, the compiler provides a default constructor (no-argument constructor). A doubly-linked list is a data structure where each node contains data and two pointers: one to the next node in the sequence and one to the previous node. This bidirectional linking allows for traversal in both forward and backward directions. Applications of DLLs include:
global
keyword. A DBMS is a software system used to manage, store, and retrieve data in a database. Key benefits include:
Both DELETE
and TRUNCATE
are used to remove data from a table, but they differ in several ways:
DELETE
operations are logged individually, allowing for rollback. TRUNCATE
operations are minimally logged or not logged at all, making them faster but preventing rollback.DELETE
can be part of a transaction and can be rolled back. TRUNCATE
is a DDL (Data Definition Language) command and cannot be rolled back.TRUNCATE
resets the identity (auto-increment) counter of a table to its initial seed value. DELETE
does not reset the identity counter; the next inserted row will have an identity value that is one greater than the last value used.DELETE
allows the use of a WHERE
clause to delete specific rows based on a condition. TRUNCATE
removes all rows from the table.TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are both fundamental protocols in the Internet protocol suite, used for transmitting data over networks. Key differences include:
The time complexity of sorting algorithms varies depending on the algorithm and the input data. Here are some common time complexities in the average case:
virtual
keyword. The purpose of a virtual function is to allow a derived class to override the base class's implementation of the function. When a virtual function is called through a pointer or reference of the base class type that is actually referring to an object of the derived class, the version of the function in the derived class is executed (run-time polymorphism). This is achieved through a mechanism called virtual table (vtable) and virtual pointer (vptr). def find_lca(root, node1, node2):
if root is None:
return None
if root == node1 or root == node2:
return root
left = find_lca(root.left, node1, node2)
right = find_lca(root.right, node1, node2)
if left and right:
return root
return left or right
int[] array = {3, 1, 2, 3, 4, 3, 5, 6, 3};
Arrays.sort(array);
int[] array = {3, 1, 2, 3, 4, 3, 5, 6, 3};
quicksort(array, 0, array.length - 1);
public static void quicksort(int[] array, int left, int right) {
if (left < right) {
int pivot = partition(array, left, right);
quicksort(array, left, pivot - 1);
quicksort(array, pivot + 1, right);
}
}
public static int partition(int[] array, int left, int right) {
int pivot = array[right];
int i = left - 1;
for (int j = left; j < right; j++) {
if (array[j] < pivot) {
i++;
int temp = array[i];
array[i] = array[j];
array[j] = temp;
}
}
int temp = array[i + 1];
array[i + 1] = array[right];
array[right] = temp;
return i + 1;
}
(n choose k) = ((n/p) choose (k/p)) * ((n%p) choose (k%p)) (mod p)
(n/p)
choose (k/p))
is the binomial coefficient computed with the quotients of the numbers and ((n%p)
choose (k%p)
) is the binomial coefficient computed with the remainder of the numbers after dividing by prime p.std
" is often used as an abbreviation for "standard
." It is commonly used in reference to the C++ Standard Template Library (STL), which is a collection of reusable components for C++ programming.std::vector
" is a container class in the STL that is used to store a collection of objects in a dynamic array. "std::sort
" is a function in the STL that is used to sort the elements of a container.standard output
" or "standard error
," which are streams in the C++ standard library that are used to output data to the console or to a file.std::cout
" is an object in the C++ standard library that represents the standard output stream and can be used to output data to the console. "std::cerr
" is an object in the C++ standard library that represents the standard error stream and can be used to output error messages to the console.