Digital
Digital Interview Questions and Answers
Q1. What is polymerphism, encapsulation and inheritance?
Polymorphism is the ability of an object to take on many forms. Encapsulation is the practice of hiding data and methods within a class. Inheritance is the ability of a class to inherit properties and methods from a parent class.
Polymorphism allows objects to be treated as if they are of different types.
Encapsulation helps to protect data from outside interference and misuse.
Inheritance allows for code reuse and promotes a hierarchical structure of classes.
Example of polymorp...read more
Q2. Given an array of length N. Find all the possible combinations of 2 elements whose sum= 10
Find all possible combinations of 2 elements in an array of length N whose sum is 10.
Iterate through the array and for each element, check if there exists another element in the array whose sum is 10.
Use a nested loop to compare each element with every other element in the array.
Store the pairs of elements whose sum is 10 in a new array.
Return the array of pairs.
Q3. What are stacks and give some examples of stacks
Stacks are a data structure that follows the Last-In-First-Out (LIFO) principle. They are used to store and retrieve data in a specific order.
Stacks have two main operations: push (to add an element to the top) and pop (to remove the top element)
Examples of stacks include the call stack in programming languages, undo/redo functionality in text editors, and the back button in web browsers
Q4. Explain the algorithm of binary search , merge sorting and bubble sorting
Binary search finds the position of a target value within a sorted array. Merge sort and bubble sort are sorting algorithms.
Binary search: repeatedly divide the search interval in half until the target value is found or not found
Merge sort: divide the unsorted list into n sublists, repeatedly merge sublists to produce new sorted sublists until there is only 1 sublist remaining
Bubble sort: repeatedly swap adjacent elements if they are in the wrong order until the list is sorte...read more
Q5. Why is linked list better than array?
Linked list is better than array for dynamic memory allocation and insertion/deletion operations.
Linked list allows for dynamic memory allocation, while arrays have a fixed size.
Insertion and deletion operations are faster in linked list as compared to arrays.
Arrays have better cache locality and are faster for random access.
Linked list is used in applications like implementing stacks, queues, and hash tables.
Arrays are used in applications like matrix operations and binary s...read more
Q6. Why is c++ better than C?
C++ is better than C due to its object-oriented programming features and better memory management.
C++ supports object-oriented programming while C does not.
C++ has better memory management with features like constructors and destructors.
C++ has more advanced features like templates and exceptions.
C++ is more versatile and can be used for both low-level system programming and high-level application development.
C++ has a larger standard library compared to C.
C++ allows for func...read more
Q7. Advantages of python over c++
Python is easier to learn, has simpler syntax, and is more versatile than C++.
Python has a simpler syntax and is easier to read and write than C++.
Python is an interpreted language, which means it doesn't need to be compiled before running.
Python has a vast library of modules and packages that can be easily imported and used.
Python is more versatile than C++ and can be used for a wide range of applications, including web development, data analysis, and artificial intelligence...read more
Q8. What is the statergy for marketing?
Marketing strategy involves identifying target audience, creating a unique value proposition, and selecting appropriate channels.
Identify target audience
Create unique value proposition
Select appropriate channels
Analyze competition
Set goals and objectives
Develop a budget
Measure and adjust strategy
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month