Razorpay
Primus Imaging & Diagnostic Centre Interview Questions and Answers
Q1. Reverse Linked List Problem Statement
Given a Singly Linked List of integers, your task is to reverse the Linked List by altering the links between the nodes.
Input:
The first line of input is an integer T, rep...read more
Reverse a singly linked list by altering the links between nodes.
Iterate through the linked list and reverse the links between nodes
Use three pointers to keep track of the current, previous, and next nodes
Update the links between nodes to reverse the list
Return the head of the reversed linked list
Q2. Middle of a Linked List
You are given the head node of a singly linked list. Your task is to return a pointer pointing to the middle of the linked list.
If there is an odd number of elements, return the middle ...read more
Return the middle element of a singly linked list, or the one farther from the head if there are even elements.
Traverse the linked list with two pointers, one moving twice as fast as the other
When the fast pointer reaches the end, the slow pointer will be at the middle
If there are even elements, return the one that is farther from the head node
Handle edge cases like linked list of size 1 or empty list
Designing an LRU Cache involves implementing a data structure that stores a fixed number of items and removes the least recently used item when full.
Start by defining the data structure for the cache, typically using a combination of a hashmap and a doubly linked list.
Implement methods for getting and setting key-value pairs in the cache.
When a new item is added to the cache, check if it exceeds the maximum capacity. If so, remove the least recently used item.
Update the posit...read more
Q4. What is ai and what are its features
AI stands for artificial intelligence, which is the simulation of human intelligence processes by machines.
AI involves machines performing tasks that typically require human intelligence, such as visual perception, speech recognition, decision-making, and language translation.
AI systems can learn from data, adapt to new inputs, and perform tasks autonomously.
Examples of AI include virtual assistants like Siri and Alexa, self-driving cars, and recommendation systems like those...read more
Q5. Merge interval greedy problem
Merge overlapping intervals to create a new set of non-overlapping intervals.
Sort the intervals based on the start time.
Iterate through the intervals and merge overlapping intervals.
Return the merged intervals as the final result.
Q6. Build an Analog Clock
Analog clock can be built using HTML, CSS, and JavaScript to display current time.
Create a circular clock face using HTML and CSS
Use JavaScript to get current time and update clock hands accordingly
Rotate clock hands based on current time
Q7. Calculate factorial using tabulation
Factorial calculation using tabulation in dynamic programming
Create an array to store factorial values up to n
Initialize the array with base cases (0! = 1, 1! = 1)
Iterate from 2 to n and calculate factorial using previous values in the array
Return the factorial value at index n
Q8. Given scenario X, what would be your approach?
Top HR Questions asked in Primus Imaging & Diagnostic Centre
Interview Process at Primus Imaging & Diagnostic Centre
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month