Add office photos
Employer?
Claim Account for FREE

Microsoft Corporation

4.0
based on 1.7k Reviews
Video summary
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by

100+ Eskag Pharma Interview Questions and Answers

Updated 8 Aug 2024
Popular Designations

Q101. How will you avoid race condition on shared memory?

Ans.

Use synchronization techniques like locks, semaphores, or mutexes to prevent multiple processes from accessing shared memory simultaneously.

  • Implementing a locking mechanism to ensure only one process can access the shared memory at a time.

  • Using semaphores to control access to the shared memory.

  • Using mutexes to ensure mutual exclusion and prevent race conditions.

  • Using atomic operations to ensure that memory operations are indivisible.

  • Using message passing instead of shared mem...read more

Add your answer

Q102. If you have design offline browser and what will be challenges that you will face

Ans.

Designing an offline browser poses challenges such as data storage, synchronization, and user experience.

  • Ensuring efficient data storage and retrieval

  • Implementing synchronization with online content

  • Providing a seamless user experience with limited connectivity

  • Handling updates and changes to online content

  • Managing cache and memory usage

  • Dealing with security concerns

  • Handling different file types and formats

Add your answer

Q103. Given 5 points in a plane, prove that there will be atleast two points such that their midpoint is an integer

Ans.

Prove that given 5 points in a plane, there will be at least two points such that their midpoint is an integer.

  • Consider the x and y coordinates of the 5 points.

  • If any two points have the same x and y coordinates, their midpoint will be an integer.

  • If not, consider the differences between the x and y coordinates of each pair of points.

  • If any two pairs have differences that are both even or both odd, their midpoints will be integers.

  • By the Pigeonhole Principle, there must be at ...read more

Add your answer

Q104. You are given binary tree. Weight of node in binary tree=data present in it*level of that node(root’s level was given to be 1).Find the node in tree with maximum weight

Ans.

Find node with maximum weight in a binary tree based on data and level of node

  • Calculate weight of each node based on data and level

  • Traverse the binary tree and keep track of node with maximum weight

  • Return the node with maximum weight

Add your answer
Discover Eskag Pharma interview dos and don'ts from real experiences

Q105. Given three sides of a triangle, find whether a triangle is right angled, isosceles, equilateral, scalene in nature

Ans.

Given three sides of a triangle, determine its nature.

  • Check if any two sides are equal to determine if it's isosceles

  • Check if all three sides are equal to determine if it's equilateral

  • Use Pythagoras theorem to check if it's right angled

  • If none of the above, it's a scalene triangle

Add your answer

Q106. Insert an element into a sorted circular linked list. (Consider all cases, inserting in the beginning, end and middle)

Ans.

Insert an element into a sorted circular linked list.

  • Find the correct position to insert the element based on its value

  • Update the pointers of the previous and next nodes to include the new node

  • Handle special cases such as inserting at the beginning or end of the list

  • Example: Inserting 5 into a list with values 1, 3, 4, 6, 7 would result in 1, 3, 4, 5, 6, 7

Add your answer
Are these interview questions helpful?

Q107. Given a node in a binary tree, find the leftmost node in the same level. I wrote the pseudocode, and testcases

Ans.

Find the leftmost node in the same level as a given node in a binary tree.

  • Traverse the tree level by level using BFS

  • For each level, keep track of the leftmost node encountered

  • Return the leftmost node at the same level as the given node

Add your answer

Q108. Given a set of courses along with the prerequisite courses for these courses, write a program to find the minimum number of semesters required to wrap up all the courses

Ans.

Program to find minimum semesters required to complete courses with prerequisites

  • Create a graph with courses as nodes and prerequisites as edges

  • Use topological sorting to find the order of courses to be taken

  • Calculate the minimum number of semesters based on the order obtained

  • Handle cases where there are cycles in the graph

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q109. Given a string INPUT, find the longest repeating substring

Ans.

Find the longest repeating substring in a given string.

  • Create an array of all possible substrings of the given string.

  • Sort the array in lexicographic order.

  • Find the longest common prefix between adjacent strings.

  • Return the longest common prefix found.

  • If no repeating substring is found, return an empty string.

Add your answer
Q110. Find the total number of palindromic substrings in a given string.
Ans.

Count total palindromic substrings in a given string.

  • Iterate through each character in the string and consider it as the center of a palindrome. Expand outwards to find all palindromic substrings.

  • Use dynamic programming to efficiently check if a substring is a palindrome.

  • Consider both odd-length and even-length palindromes.

  • Example: Input 'ababa', output 7 (a, b, a, b, a, aba, aba)

Add your answer

Q111. WAP to check if the binary tree is height-balanced and write testcases

Ans.

WAP to check if binary tree is height-balanced and write testcases

  • A binary tree is height-balanced if the difference between the heights of its left and right subtrees is not more than 1

  • Use recursion to check if each subtree is height-balanced

  • Write testcases to cover all possible scenarios, including empty tree, single node tree, and unbalanced trees

Add your answer

Q112. Give the data structure to represent N-ary tree and write to code for its BFS

Ans.

Data structure and code for BFS of N-ary tree

  • N-ary tree can be represented using a node class with a list of child nodes

  • BFS can be implemented using a queue data structure

  • Iterate through the queue and add child nodes to the queue

  • Pop the node from the queue and process it

  • Repeat until the queue is empty

Add your answer

Q113. Write the code to find inorder successor of given node in binary tree

Ans.

Code to find inorder successor of given node in binary tree

  • Check if the given node has a right subtree, if yes then find the leftmost node in the right subtree

  • If the given node does not have a right subtree, then traverse up the tree until we reach a node which is the left child of its parent

  • If we reach the root and the given node is the rightmost node, then there is no inorder successor

Add your answer

Q114. Find the nth power of a number in shortest computational time

Ans.

Use exponentiation by squaring algorithm to find nth power of a number in shortest computational time.

  • Use recursion to divide the power by 2 and multiply the base accordingly

  • If power is odd, multiply the base with the result of recursive call

  • If power is negative, take reciprocal of base and make power positive

  • Handle edge cases like power=0 and base=0 or 1

  • Time complexity is O(log n)

Add your answer

Q115. Check the no of repeated occurences of a substring in a string

Ans.

Count the number of times a substring appears in a string.

  • Use a loop to iterate through the string and check for the substring at each index.

  • Use the count() method to count the number of occurrences of the substring.

  • Consider using regular expressions to find all occurrences of the substring.

  • Handle edge cases such as empty strings or substrings.

Add your answer

Q116. You are given file pointer and integer n, write c code for printing last “n” lines in that file

Ans.

C code to print last n lines of a file given file pointer and integer n.

  • Use fseek() to move the file pointer to the end of the file

  • Count the number of newline characters encountered from the end of the file until n lines are found

  • Use fgets() to read and print the last n lines

Add your answer

Q117. Given a binary search tree and a no. N in the tree, print the leftmost node at the same level as N

Ans.

Print the leftmost node at the same level as a given node in a binary search tree.

  • Traverse the tree level by level using BFS

  • Keep track of the leftmost node at each level

  • Return the leftmost node at the level of the given node

  • If the given node is not found, return null

Add your answer

Q118. Search for an element in a rotated sorted array (of course in sublinear time!)

Ans.

Search for an element in a rotated sorted array in sublinear time.

  • Use binary search to find the pivot point where the array is rotated.

  • Determine which half of the array the target element is in.

  • Perform binary search on the appropriate half of the array to find the target element.

  • Time complexity is O(log n).

Add your answer

Q119. What is IPC? What are its types? compare them

Ans.

IPC stands for Inter-Process Communication. It is a mechanism that allows processes to communicate with each other.

  • Types of IPC include shared memory, message passing, and pipes.

  • Shared memory allows processes to share a portion of memory.

  • Message passing involves sending messages between processes.

  • Pipes are a unidirectional form of communication.

  • Shared memory is faster than message passing, but message passing is more reliable.

  • Pipes are useful for simple communication between ...read more

Add your answer

Q120. Who is the founder of c language?

Ans.

The founder of C language is Dennis Ritchie.

  • Dennis Ritchie is the creator of the C programming language.

  • He developed C language at Bell Labs in the early 1970s.

  • C language is widely used for system programming and developing other programming languages.

View 1 answer

Q121. Find the nth element in a tribonacci(a variation of Fibonacci) series. t(n)=t(n-1)+t(n-2)+t(n-3)

Ans.

Find the nth element in a tribonacci series.

  • Use recursion to solve the problem.

  • Handle base cases for n=0, n=1, and n=2.

  • For n>2, use the formula t(n)=t(n-1)+t(n-2)+t(n-3).

  • Return the value of t(n) for the given n.

Add your answer

Q122. Given a node in a binary tree, find the leftmost node in the same level

Ans.

Find the leftmost node in the same level as a given node in a binary tree.

  • Traverse the tree level by level using BFS

  • For each level, keep track of the leftmost node encountered

  • Return the leftmost node in the level of the given node

Add your answer

Q123. Find the nth largest number in a binary tree

Ans.

Find the nth largest number in a binary tree

  • Traverse the tree in-order and store the values in an array

  • Return the (n-1)th index of the sorted array in descending order

  • Use a max heap to keep track of the largest n elements

Add your answer

Q124. Merge two sorted linked list and write testcases

Ans.

Merging two sorted linked lists and writing test cases.

  • Create a new linked list to store the merged list

  • Compare the first nodes of both lists and add the smaller one to the new list

  • Repeat until one of the lists is empty, then add the remaining nodes to the new list

  • Write test cases to cover all possible scenarios, including empty lists and lists of different lengths

Add your answer

Q125. Find the intersection point of two linked list

Ans.

Find the intersection point of two linked lists.

  • Traverse both lists and find their lengths.

  • Move the head of the longer list to make both lists equal in length.

  • Traverse both lists in parallel until the intersection point is found.

Add your answer

Q126. When was c language developed?

Ans.

C language was developed in 1972.

  • Developed by Dennis Ritchie at Bell Labs.

  • First appeared in 1972.

  • Influential in the development of many other programming languages like C++, Java, and Python.

View 1 answer

Q127. code optimization problem with reduced time complexity

Ans.

Optimizing code for reduced time complexity by using efficient algorithms and data structures.

  • Use efficient data structures like hash tables, binary search trees, or priority queues.

  • Avoid nested loops and try to reduce the number of iterations.

  • Utilize dynamic programming or memoization to store and reuse intermediate results.

  • Consider using bitwise operations for certain calculations.

  • Optimize recursive functions by eliminating redundant calculations.

Add your answer

Q128. What is c language ?

Ans.

C language is a high-level programming language known for its efficiency and flexibility.

  • C language was developed by Dennis Ritchie at Bell Labs in the early 1970s.

  • It is widely used for system programming, developing operating systems, and embedded systems.

  • C is a procedural programming language with a rich set of built-in functions and operators.

  • Example: printf() function is used to print output in C language.

View 1 answer
Q129. Design an elevator system.
Ans.

Design an elevator system for efficient vertical transportation.

  • Divide building into zones to optimize elevator usage.

  • Implement algorithms for efficient elevator scheduling.

  • Include safety features like emergency stop buttons and overload sensors.

  • Consider user interface for passengers to select floors and monitor elevator status.

Add your answer

Q130. What type of program

Ans.

I'm sorry, could you please clarify what type of program you are referring to?

  • Ask for more information about the program in question

  • Provide examples of different types of programs

  • Clarify the context of the question

Add your answer

Q131. Tell me about graph

Ans.

A graph is a data structure that consists of nodes (vertices) connected by edges.

  • Nodes represent entities and edges represent relationships between entities

  • Graphs can be directed or undirected

  • Common graph algorithms include depth-first search and breadth-first search

Add your answer
1
2

More about working at Microsoft Corporation

Top Rated Internet/Product Company - 2024
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Eskag Pharma

based on 29 interviews
4 Interview rounds
Coding Test Round - 1
Coding Test Round - 2
One-on-one Round
HR Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Interview Questions from Similar Companies

3.8
 • 107 Interview Questions
3.5
 • 60 Interview Questions
3.8
 • 45 Interview Questions
4.4
 • 30 Interview Questions
3.3
 • 19 Interview Questions
3.8
 • 12 Interview Questions
View all
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
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

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