Add office photos
Engaged Employer

Betterhalf.ai

4.1
based on 44 Reviews
Filter interviews by

Bharat Parenterals Interview Questions and Answers

Updated 10 Jul 2024

Q1. How will you optimise Component in React?

Ans.

Optimizing components in React involves using shouldComponentUpdate, memoization, lazy loading, and code splitting.

  • Use shouldComponentUpdate to prevent unnecessary re-renders

  • Memoize expensive calculations using useMemo or useCallback

  • Implement lazy loading for components that are not immediately needed

  • Utilize code splitting to load only necessary components when required

Add your answer

Q2. Machine coding ques in react to create a form

Ans.

Create a form using React for machine coding interview

  • Use React components to create form elements

  • Handle form submission using state and event handlers

  • Validate form inputs before submission

Add your answer

Q3. useMemo vs useCallback

Ans.

useMemo is used for memoization of values, while useCallback is used for memoization of functions.

  • useMemo is used to memoize a value and only recompute it when its dependencies change.

  • useCallback is used to memoize a function instance and only re-create it when its dependencies change.

  • Example: useMemo can be used to memoize the result of a complex computation, while useCallback can be used to memoize a callback function passed to a child component.

Add your answer

Q4. flatlist vs scrollview in RN

Ans.

FlatList is optimized for long lists with dynamic data, while ScrollView is for small lists or content that needs to be scrolled.

  • FlatList is more performant for long lists as it only renders the items that are currently visible on the screen.

  • ScrollView is more suitable for smaller lists or content that does not need to be dynamically loaded.

  • FlatList supports key extraction for efficient rendering, while ScrollView does not have built-in support for this.

  • FlatList provides buil...read more

Add your answer
Discover Bharat Parenterals interview dos and don'ts from real experiences

Q5. Hoisting in javascript

Ans.

Hoisting is a JavaScript mechanism where variable and function declarations are moved to the top of their containing scope.

  • Variable declarations are hoisted to the top of their scope but not their initializations.

  • Function declarations are fully hoisted, meaning they can be called before they are declared.

  • Hoisting can lead to unexpected behavior if not understood properly.

Add your answer

Q6. Left view of binary tree

Ans.

The left view of a binary tree is the set of nodes visible when the tree is viewed from the left side.

  • Traverse the tree level by level from left to right

  • At each level, add the first node encountered to the result array

  • Repeat this process for each level of the tree

  • Example: For a binary tree with root node 1, left child 2, and right child 3, the left view would be [1, 2]

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

Interview Process at Bharat Parenterals

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

Top Interview Questions from Similar Companies

3.8
 • 1.6k Interview Questions
3.5
 • 417 Interview Questions
3.9
 • 304 Interview Questions
3.8
 • 202 Interview Questions
4.0
 • 160 Interview Questions
4.1
 • 153 Interview Questions
View all
Top Betterhalf.ai 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