Filter interviews by
Implementing an LRU cache to efficiently manage data retrieval and storage based on usage frequency.
Use a hash map for O(1) access to cache items.
Use a doubly linked list to maintain the order of usage.
When adding an item, place it at the front of the list.
When accessing an item, move it to the front of the list.
If the cache exceeds its capacity, remove the least recently used item from the end of the list.
Example...
Explore various ORM options in Java beyond Spring Data JPA for effective database management.
Hibernate: A popular ORM framework that provides a powerful, flexible API for database interactions. Example: Using SessionFactory to manage sessions.
JPA (Java Persistence API): A specification for ORM in Java. Can be used with various implementations like Hibernate or EclipseLink. Example: Using EntityManager for CRUD ope...
Find the longest common subsequence (LCS) between two strings using dynamic programming.
LCS is a classic problem in computer science, often solved using dynamic programming.
The LCS of two strings is the longest sequence that appears in both strings in the same order.
Example: For strings 'ABCBDAB' and 'BDCAB', the LCS is 'BCAB' with length 4.
Dynamic programming approach involves creating a 2D array to store lengths...
Yes, a private constructor in Java restricts instantiation and is often used in singleton patterns or utility classes.
Singleton Pattern: A class can have a private constructor to ensure that only one instance of the class is created. Example: public class Singleton { private static Singleton instance; private Singleton() {} public static Singleton getInstance() { if (instance == null) { instance = new Singleton();...
Creating a collection from a string involves splitting the string into elements and storing them in a data structure.
Use the split() method to divide the string into an array. Example: 'a,b,c'.split(',') results in ['a', 'b', 'c'].
Choose a collection type based on requirements: Array, List, Set, etc.
For unique elements, consider using a Set. Example: new Set('aabb') results in ['a', 'b'].
If order matters, use an A...
Java provides various classes for file handling, allowing reading and writing operations using streams.
Use FileWriter for writing text files: FileWriter writer = new FileWriter('file.txt');
Use BufferedWriter for efficient writing: BufferedWriter bufferedWriter = new BufferedWriter(writer);
Always close the writer using bufferedWriter.close() to free resources.
Handle exceptions using try-catch blocks to manage IOExc...
Read command line arguments in Python to execute functions based on user input.
Use the 'sys' module to access command line arguments: `import sys`.
Access arguments via `sys.argv`, which is a list of command line inputs.
Example: `sys.argv[0]` is the script name, `sys.argv[1]` is the first argument.
Define functions and use conditional statements to execute based on input.
Example: `if sys.argv[1] == 'test': run_test_...
Assertions in Playwright validate expected outcomes in automated tests, ensuring application behavior meets requirements.
Use 'expect' from Playwright's test library to create assertions.
Example: expect(page.title()).toBe('Expected Title');
Assertions can check various conditions like visibility, text content, and element states.
Example: expect(await page.isVisible('selector')).toBe(true);
Assertions can be chained f...
In Playwright, the alternative for @Test annotation is using the test function from the Playwright Test framework.
Playwright uses the 'test' function to define test cases, similar to @Test in other frameworks.
Example: 'test('should load the homepage', async () => { ... });'
You can group tests using 'describe' blocks: 'describe('Homepage tests', () => { ... });'
Playwright supports various assertions through t...
In Java, a top-level class cannot be declared private; only nested classes can be private.
Top-level classes can be public, protected, or package-private, but not private.
Private classes can only be nested within another class.
Example of a private nested class: class Outer { private class Inner {} }
Private classes are used to encapsulate functionality within a specific context.
I appeared for an interview in Feb 2025, where I was asked the following questions.
Java provides various classes for file handling, allowing reading and writing operations using streams.
Use FileWriter for writing text files: FileWriter writer = new FileWriter('file.txt');
Use BufferedWriter for efficient writing: BufferedWriter bufferedWriter = new BufferedWriter(writer);
Always close the writer using bufferedWriter.close() to free resources.
Handle exceptions using try-catch blocks to manage IOExceptio...
Creating a collection from a string involves splitting the string into elements and storing them in a data structure.
Use the split() method to divide the string into an array. Example: 'a,b,c'.split(',') results in ['a', 'b', 'c'].
Choose a collection type based on requirements: Array, List, Set, etc.
For unique elements, consider using a Set. Example: new Set('aabb') results in ['a', 'b'].
If order matters, use an Array ...
In Java, a top-level class cannot be declared private; only nested classes can be private.
Top-level classes can be public, protected, or package-private, but not private.
Private classes can only be nested within another class.
Example of a private nested class: class Outer { private class Inner {} }
Private classes are used to encapsulate functionality within a specific context.
Yes, a private constructor in Java restricts instantiation and is often used in singleton patterns or utility classes.
Singleton Pattern: A class can have a private constructor to ensure that only one instance of the class is created. Example: public class Singleton { private static Singleton instance; private Singleton() {} public static Singleton getInstance() { if (instance == null) { instance = new Singleton(); } re...
In Playwright, the alternative for @Test annotation is using the test function from the Playwright Test framework.
Playwright uses the 'test' function to define test cases, similar to @Test in other frameworks.
Example: 'test('should load the homepage', async () => { ... });'
You can group tests using 'describe' blocks: 'describe('Homepage tests', () => { ... });'
Playwright supports various assertions through the 'e...
Assertions in Playwright validate expected outcomes in automated tests, ensuring application behavior meets requirements.
Use 'expect' from Playwright's test library to create assertions.
Example: expect(page.title()).toBe('Expected Title');
Assertions can check various conditions like visibility, text content, and element states.
Example: expect(await page.isVisible('selector')).toBe(true);
Assertions can be chained for mo...
Read command line arguments in Python to execute functions based on user input.
Use the 'sys' module to access command line arguments: `import sys`.
Access arguments via `sys.argv`, which is a list of command line inputs.
Example: `sys.argv[0]` is the script name, `sys.argv[1]` is the first argument.
Define functions and use conditional statements to execute based on input.
Example: `if sys.argv[1] == 'test': run_test_funct...
Creating persistent automation involves ensuring scripts run after system restarts using services or scheduled tasks.
Use a service manager (e.g., systemd on Linux) to run automation scripts on startup.
Create a scheduled task in Windows Task Scheduler to trigger automation scripts after reboot.
Implement a watchdog mechanism to restart automation if it fails unexpectedly.
Store automation state in a database or file to re...
I appeared for an interview in Jun 2025, where I was asked the following questions.
I appeared for an interview in Mar 2025, where I was asked the following questions.
Implementing an LRU cache to efficiently manage data retrieval and storage based on usage frequency.
Use a hash map for O(1) access to cache items.
Use a doubly linked list to maintain the order of usage.
When adding an item, place it at the front of the list.
When accessing an item, move it to the front of the list.
If the cache exceeds its capacity, remove the least recently used item from the end of the list.
Example: For...
Explore various ORM options in Java beyond Spring Data JPA for effective database management.
Hibernate: A popular ORM framework that provides a powerful, flexible API for database interactions. Example: Using SessionFactory to manage sessions.
JPA (Java Persistence API): A specification for ORM in Java. Can be used with various implementations like Hibernate or EclipseLink. Example: Using EntityManager for CRUD operatio...
I appeared for an interview in Oct 2024, where I was asked the following questions.
Find the longest common subsequence (LCS) between two strings using dynamic programming.
LCS is a classic problem in computer science, often solved using dynamic programming.
The LCS of two strings is the longest sequence that appears in both strings in the same order.
Example: For strings 'ABCBDAB' and 'BDCAB', the LCS is 'BCAB' with length 4.
Dynamic programming approach involves creating a 2D array to store lengths of L...
I applied via Naukri.com and was interviewed in Mar 2024. There was 1 interview round.
I applied via Naukri.com and was interviewed in Dec 2023. There was 1 interview round.
I applied via Approached by Company and was interviewed before Sep 2023. There were 3 interview rounds.
The code will output the sum of all elements in the array.
The code uses a for loop to iterate through the array and add each element to a sum variable.
The sum variable is then printed at the end to display the total sum of all elements.
Top trending discussions
Some of the top questions asked at the Varian Medical Systems interview -
The duration of Varian Medical Systems interview process can vary, but typically it takes about less than 2 weeks to complete.
based on 7 interview experiences
Difficulty level
Duration
based on 106 reviews
Rating in categories
Software Engineer
46
salaries
| ₹7.6 L/yr - ₹22.7 L/yr |
Senior Software Engineer
18
salaries
| ₹16 L/yr - ₹34 L/yr |
Software Engineer III
13
salaries
| ₹12.2 L/yr - ₹26.8 L/yr |
Engineering Manager
12
salaries
| ₹29.3 L/yr - ₹39.5 L/yr |
Information System Engineer
12
salaries
| ₹7 L/yr - ₹20.5 L/yr |
Poly Medicure
Medtronic
Becton Dickinson
Careon Healthcare Solutions