Add office photos
Engaged Employer

Big Oh Notation

3.0
based on 44 Reviews
Filter interviews by

Tcg Digital Solutions Interview Questions and Answers

Updated 28 Apr 2024

Q1. What is the difference between classes and struct

Ans.

Classes are reference types while structs are value types.

  • Classes support inheritance while structs do not.

  • Classes have default access modifier as internal while structs have it as private.

  • Classes have a destructor while structs do not.

  • Classes are allocated on heap while structs are allocated on stack.

  • Classes can be null while structs cannot.

Add your answer

Q2. Implement linked list

Ans.

A linked list is a data structure where each element points to the next one.

  • Create a Node class with a value and a next pointer

  • Create a LinkedList class with a head pointer and methods to add, remove, and traverse nodes

  • Example: LinkedList ll = new LinkedList(); ll.add(5); ll.add(10); ll.remove(5);

Add your answer

Q3. What is Higher Order Component ?

Ans.

Higher Order Component is a function that takes a component and returns a new component with additional functionality.

  • Higher Order Components (HOCs) are a pattern in React for reusing component logic.

  • They are functions that accept a component and return a new component with enhanced capabilities.

  • HOCs can be used for cross-cutting concerns like authentication, logging, or data fetching.

  • They enable code reuse, composition, and separation of concerns in React applications.

Add your answer

Q4. What is Virtual DOM, Explain ?

Ans.

Virtual DOM is a concept in web development where a lightweight copy of the actual DOM is created and manipulated for efficient rendering.

  • Virtual DOM is an abstraction of the real DOM.

  • It is used in frameworks like React to improve performance.

  • Changes made to the virtual DOM are compared with the actual DOM, and only the necessary updates are applied.

  • This approach reduces the number of direct manipulations on the actual DOM, resulting in faster rendering.

  • Virtual DOM allows dev...read more

Add your answer
Discover Tcg Digital Solutions interview dos and don'ts from real experiences

Q5. Inorder tree traversal.

Ans.

Inorder tree traversal is a way of visiting each node in a binary tree in a specific order.

  • Start at the leftmost node of the tree

  • Visit the left subtree recursively

  • Visit the current node

  • Visit the right subtree recursively

Add your answer

Q6. Life Cycle Methods in React

Ans.

Life Cycle Methods in React

  • React components have several life cycle methods that are called at different stages of a component's life

  • These methods allow developers to perform actions like initializing state, fetching data, and updating the UI

  • Some commonly used life cycle methods are componentDidMount, componentDidUpdate, and componentWillUnmount

Add your answer

Q7. Dispatch Queue vs operations

Ans.

Dispatch Queue is a thread-safe way to execute tasks asynchronously, while Operations are a way to encapsulate tasks.

  • Dispatch Queue is a high-level API for managing concurrent operations.

  • Operations are objects that encapsulate a single task or multiple tasks.

  • Dispatch Queue is simpler to use and recommended for most use cases.

  • Operations provide more control over task dependencies and cancellation.

  • Both can be used together to achieve complex concurrency scenarios.

Add your answer

Q8. Custom hook implementation

Ans.

Custom hooks in React are reusable functions that contain logic shared between components.

  • Custom hooks start with 'use' keyword (e.g. useState, useEffect)

  • They can be used to share logic like fetching data, managing state, or subscribing to events

  • Example: Custom hook for fetching data from an API can be used in multiple components

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Tcg Digital Solutions

based on 7 interviews in the last 1 year
Interview experience
3.0
Average
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

3.9
 • 1.4k Interview Questions
4.1
 • 771 Interview Questions
3.4
 • 488 Interview Questions
3.8
 • 333 Interview Questions
4.2
 • 310 Interview Questions
4.1
 • 153 Interview Questions
View all
Top Big Oh Notation Interview Questions And Answers
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter