ConsultAdd
10+ Jenerx Pharma Solutions Interview Questions and Answers
Q1. Coding Question - Find 2nd largest element in array with least time complexity
Find the 2nd largest element in an array with the least time complexity.
Sort the array in descending order and return the element at index 1.
Initialize two variables to keep track of the largest and second largest elements.
Iterate through the array and update the variables accordingly.
Return the second largest element.
Q2. How to find if the Singly Linked List is cyclic or not in optimal way
Use Floyd's cycle detection algorithm to find if a Singly Linked List is cyclic or not.
Use two pointers, slow and fast, where slow moves one step at a time and fast moves two steps at a time.
If there is a cycle, the two pointers will eventually meet at some point.
If the fast pointer reaches the end of the list (null), then there is no cycle.
Q3. How to optimize nested queries to minimise number of comparisions.
Q4. you have been provided a sorted list time complexity achieved after we apply bubble sorting
Bubble sorting has a time complexity of O(n^2) for a sorted list.
Bubble sorting has a worst-case time complexity of O(n^2) for a sorted list.
The time complexity does not change even if the list is already sorted.
Example: If we have a sorted list of size n, bubble sorting will still take O(n^2) time.
Q5. Coding questions: 1. Frog jump 2 Find the missing and repeated integer.
Q6. Give the recursion tree for the following code
Q7. Best sorting algo?time complexity of it?
QuickSort is one of the best sorting algorithms with an average time complexity of O(n log n).
QuickSort is a divide and conquer algorithm that works by selecting a 'pivot' element and partitioning the array around the pivot.
It has an average time complexity of O(n log n) and a worst-case time complexity of O(n^2).
Example: ['apple', 'banana', 'cherry', 'date', 'fig'] can be sorted using QuickSort.
Example: ['3', '1', '4', '1', '5', '9', '2', '6', '5'] can be sorted using QuickS...read more
Q8. What is an abstract class?
An abstract class is a class that cannot be instantiated and may contain abstract methods that must be implemented by its subclasses.
Cannot be instantiated directly
May contain abstract methods
Used as a blueprint for other classes
Q9. Coding ques: Longest subsequence in a string
Find the longest subsequence in a string
Iterate through the string and keep track of the longest subsequence found so far
Use a hashmap to store the last index of each character seen
Update the longest subsequence length when a character is repeated
Q10. Convert IPv4 address to IPv6 address
Q11. What is abstraction?
Abstraction is the process of hiding complex details and showing only the essential features of an object or system.
Abstraction allows us to focus on what an object does, rather than how it does it
It helps in simplifying complex systems by breaking them down into smaller, more manageable parts
Examples of abstraction include using a car without needing to understand its internal combustion engine, or using a smartphone without knowing its hardware components
Q12. How make a queue using a stack
To implement a queue using a stack, use two stacks and simulate the queue operations.
Use two stacks, one for enqueue operation and one for dequeue operation.
For enqueue operation, simply push elements onto the stack used for enqueueing.
For dequeue operation, if the dequeue stack is empty, pop all elements from enqueue stack and push onto dequeue stack.
Then pop from the dequeue stack to simulate dequeue operation.
Q13. Given array find sum of all elements
Calculate sum of all elements in a given array of strings
Iterate through the array and convert each element to integer before adding to sum
Handle edge cases like empty array or non-numeric elements
Return the final sum after iterating through all elements
Q14. What is requirement.
A requirement is a specific need or expectation that must be met in order to achieve a desired outcome.
A requirement is a statement of what a product or service must do or how it must perform.
Requirements can be functional (what the product must do) or non-functional (how well it must do it).
Requirements should be clear, concise, and measurable.
Examples of requirements include: the ability to save and retrieve data, a response time of less than 2 seconds, and compatibility wi...read more
Q15. Remove nose from back of LinkedIn list
Use a sorting algorithm to move the nose to the front of the LinkedIn list.
Implement a sorting algorithm that moves the nose to the front of the list.
Identify the nose in the list and swap it with the first element.
Update the LinkedIn list with the nose at the front.
Q16. Given an array Reverse array
Reverse array of strings
Iterate through the array and swap elements from start to end
Use two pointers, one at the beginning and one at the end, and swap elements until they meet
Q17. Giaven a string Reverse string
Reverse a given string
Use built-in functions like reverse() or loop through the string in reverse order
Create a new string and append characters from the original string in reverse order
Convert the string to an array of characters, reverse the array, and then join it back into a string
Q18. Create a linked list
A linked list is a data structure consisting of nodes where each node points to the next node in the sequence.
Create a Node class with data and next pointer
Initialize a head pointer to null
Add nodes by updating next pointers
Traverse the list by following next pointers
Top HR Questions asked in Jenerx Pharma Solutions
Interview Process at Jenerx Pharma Solutions
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month