Capgemini
Novigo Integrated Services Interview Questions and Answers
Q1. 1) Difference between let, const, var 2) virtual Dom 3) Hooks- usestate, useeffect- it's class component features 4) Redux 5) Api calling via Redux 6) object destructuring 7) props
Questions related to JavaScript and web development
let, const, and var are used to declare variables in JavaScript with different scoping rules
Virtual DOM is a lightweight copy of the actual DOM used for efficient rendering in React
Hooks are functional components in React that allow for state management and lifecycle methods
Redux is a state management library for JavaScript applications
API calling via Redux involves dispatching actions to update the store with data from an AP...read more
Q2. Define typecasting, and what is calloc and malloc
Typecasting is converting one data type to another. Malloc and calloc are functions used to allocate memory dynamically.
Typecasting is done using casting operators like (int), (float), etc.
Malloc is used to allocate memory for a single variable while calloc is used to allocate memory for multiple variables.
Malloc and calloc return a void pointer which needs to be typecasted to the appropriate data type.
Example: int x = (int) 3.14; // typecasting float to int
Example: int *arr ...read more
Q3. What are Linkedlists? what are arrays?
Linkedlists are a data structure where each element points to the next element. Arrays are a data structure where elements are stored in contiguous memory locations.
Linkedlists are dynamic in size, while arrays have a fixed size.
Insertions and deletions are faster in linkedlists compared to arrays.
Example: Linkedlist - 1 -> 2 -> 3 -> null, Array - [1, 2, 3]
Arrays can be accessed randomly using indexes, while linkedlists need to be traversed sequentially.
Q4. What is use state in react js
useState is a hook in React that allows functional components to have state.
useState is a hook provided by React for managing state in functional components.
It returns an array with two elements - the current state value and a function to update that value.
Example: const [count, setCount] = useState(0);
The initial state value is passed as an argument to useState.
Q5. Write a code snippet for use effect
Code snippet for useEffect hook in React
UseEffect is a hook in React that allows you to perform side effects in function components
It runs after every render and can be used for data fetching, subscriptions, or manually changing the DOM
Example: useEffect(() => { console.log('Component rendered') }, [])
Q6. knapsack problem in dynamic programming
Knapsack problem is a dynamic programming problem where we have to maximize the value of items in a knapsack with a given weight limit.
Divide the problem into subproblems and solve them recursively
Use memoization to avoid solving the same subproblem multiple times
Start with the base case and build up to the final solution
Examples: 0/1 Knapsack problem, Fractional Knapsack problem
Q7. q1->reverse linked list.
Reverse a linked list
Traverse the linked list and change the direction of the pointers
Use three pointers to keep track of current, previous and next nodes
Handle the edge cases of empty list and single node list
Q8. oops concepts in python
Object-oriented programming concepts in Python
Python supports object-oriented programming (OOP) concepts like classes, objects, inheritance, polymorphism, and encapsulation.
Classes are blueprints for creating objects, which are instances of classes.
Inheritance allows a class to inherit attributes and methods from another class.
Polymorphism allows objects of different classes to be treated as objects of a common superclass.
Encapsulation restricts access to certain components o...read more
More about working at Capgemini
Top HR Questions asked in Novigo Integrated Services
Interview Process at Novigo Integrated Services
Top Associate Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month