Filter interviews by
Be the first one to contribute and help others!
Polymorphism is the ability of an object to take on many forms. In C++, it is achieved through function overloading and virtual functions.
Polymorphism allows objects of different classes to be treated as objects of a common base class.
Function overloading enables multiple functions with the same name but different parameters.
Virtual functions allow derived classes to override base class functions.
Yes, I know C language. Here's a program to print numbers from 1 to 10 excluding 5.
Use a loop to iterate from 1 to 10
Inside the loop, check if the current number is equal to 5
If it is not equal to 5, print the number
The question was about finding the average of a set of numbers.
I approached the problem by first summing all the numbers in the set.
Then, I divided the sum by the total number of elements in the set to find the average.
I used a loop to iterate through the set and keep track of the sum and count of elements.
Caching is the process of storing frequently used data in a temporary storage to reduce access time. LRU caching removes least recently used data.
Caching improves performance by reducing access time to frequently used data
LRU (Least Recently Used) caching removes the least recently used data to make space for new data
LRU cache can be implemented using a doubly linked list and a hash map
When a cache hit occurs, the acce...
based on 5 reviews
Rating in categories
TCS
Accenture
Wipro
Cognizant