Add office photos
Engaged Employer

Amdocs

3.7
based on 4k Reviews
Video summary
Filter interviews by

10+ Surin Automotive Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. Remove the Kth Node from the End of a Linked List

You are given a singly Linked List with 'N' nodes containing integer data and an integer 'K'. Your task is to delete the Kth node from the end of this Linked Li...read more

Ans.

Remove the Kth node from the end of a singly linked list.

  • Traverse the linked list to find the length 'N'.

  • Calculate the position to delete from the beginning as 'N - K + 1'.

  • Delete the node at the calculated position.

  • Handle edge cases like deleting the head or tail node.

Add your answer

Q2. Intersection of Linked List Problem

You are provided with two singly linked lists containing integers, where both lists converge at some node belonging to a third linked list.

Your task is to determine the data...read more

Ans.

Find the node where two linked lists merge

  • Traverse both lists to find their lengths and the difference in lengths

  • Move the pointer of the longer list by the difference in lengths

  • Traverse both lists simultaneously until they meet at the merging node

Add your answer

Q3. Merge Two Sorted Linked Lists Problem Statement

You are provided with two sorted linked lists. Your task is to merge them into a single sorted linked list and return the head of the combined linked list.

Input:...read more

Ans.

Merge two sorted linked lists into a single sorted linked list with linear time complexity and constant space usage.

  • Create a dummy node to start the merged list

  • Compare the values of the two linked lists and add the smaller value to the merged list

  • Move the pointer of the merged list and the pointer of the smaller value list forward

  • Continue this process until one of the lists is fully traversed

  • Append the remaining elements of the other list to the merged list

  • Return the head of ...read more

Add your answer

Q4. LRU Cache Design Question

Design a data structure for a Least Recently Used (LRU) cache that supports the following operations:

1. get(key) - Return the value of the key if it exists in the cache; otherwise, re...read more

Ans.

Design a Least Recently Used (LRU) cache data structure that supports get and put operations with capacity constraint.

  • Implement a doubly linked list to keep track of the order of keys based on their recent usage.

  • Use a hashmap to store key-value pairs for quick access and update.

  • When capacity is reached, evict the least recently used item before inserting a new item.

Add your answer
Discover Surin Automotive interview dos and don'ts from real experiences
Q5. Why is Java considered platform-independent while the Java Virtual Machine (JVM) is platform-dependent?
Ans.

Java is platform-independent because the code is compiled into bytecode which can run on any platform with a JVM, making the JVM platform-dependent.

  • Java code is compiled into bytecode, which is a platform-independent intermediate code

  • The JVM interprets and executes the bytecode on different platforms

  • The JVM acts as a layer of abstraction between the Java code and the underlying platform

  • The JVM is platform-dependent because it needs to be implemented specifically for each plat...read more

Add your answer
Q6. Can you explain the life cycle of a thread in Java?
Ans.

The life cycle of a thread in Java involves creation, running, waiting, and termination.

  • A thread is created using the 'new' keyword or by implementing the Runnable interface.

  • The thread starts running when the start() method is called.

  • During execution, a thread can enter a waiting state using methods like sleep() or wait().

  • A thread terminates when its run() method completes or when the stop() method is called.

Add your answer
Are these interview questions helpful?
Q7. What is the difference between the DELETE and TRUNCATE commands in DBMS?
Ans.

DELETE removes specific rows from a table, while TRUNCATE removes all rows and resets auto-increment values.

  • DELETE is a DML command, while TRUNCATE is a DDL command.

  • DELETE can be rolled back, while TRUNCATE cannot be rolled back.

  • DELETE triggers delete triggers, while TRUNCATE does not trigger them.

  • DELETE is slower as it logs individual row deletions, while TRUNCATE is faster as it logs the deallocation of the data pages.

  • Example: DELETE FROM table_name WHERE condition; TRUNCAT...read more

Add your answer
Q8. What is the garbage collector in Java?
Ans.

Garbage collector in Java is a built-in mechanism that automatically manages memory by reclaiming unused objects.

  • Garbage collector runs in the background to reclaim memory from objects that are no longer in use.

  • It helps prevent memory leaks and optimize memory usage.

  • Examples of garbage collectors in Java include Serial, Parallel, CMS, G1, and Z Garbage Collectors.

Add your answer
Share interview questions and help millions of jobseekers 🌟
Q9. Design a Railway Reservation System.
Ans.

Railway Reservation System for booking train tickets

  • Create a database to store train schedules, seat availability, and passenger information

  • Develop a user interface for customers to search for trains, select seats, and make payments

  • Implement a booking system to reserve seats and generate tickets

  • Include features like seat selection, cancellation, and ticket printing

  • Ensure security measures for payment processing and data protection

Add your answer

Q10. For insertion and deletion which list u use?why?

Ans.

I use LinkedList for insertion and deletion as it provides constant time complexity.

  • LinkedList provides constant time complexity for insertion and deletion operations.

  • ArrayList provides linear time complexity for these operations.

  • LinkedList is preferred when frequent insertion and deletion operations are required.

  • ArrayList is preferred when frequent access to elements is required.

Add your answer

Q11. FindNon duplicate element in string prog?

Ans.

Finding non-duplicate element in a string program.

  • Iterate through the string and count the occurrence of each character.

  • Return the first character with count 1.

  • If no such character found, return null or -1.

Add your answer

Q12. Association means what?

Ans.

Association refers to a relationship between two or more objects where they are connected or linked in some way.

  • Association is a fundamental concept in object-oriented programming.

  • It is used to represent a relationship between two or more objects.

  • The relationship can be one-to-one, one-to-many, or many-to-many.

  • For example, a car has an association with its engine, as it cannot function without it.

  • Another example is a student having an association with a school, as they attend...read more

Add your answer

Q13. Diff between truncate and delete

Ans.

Truncate removes all data from a table while delete removes specific rows.

  • Truncate is faster than delete as it doesn't log individual row deletions.

  • Truncate cannot be rolled back while delete can be.

  • Truncate resets the identity of the table while delete doesn't.

  • Truncate doesn't fire triggers while delete does.

Add your answer

Q14. Write query to delete record

Ans.

Query to delete record in SQL

  • Use DELETE statement with WHERE clause to specify the record to be deleted

  • Make sure to backup data before deleting

  • Example: DELETE FROM table_name WHERE column_name = value;

Add your answer

Q15. Prog merge two list

Ans.

Merging two lists in Java

  • Create a new list to hold the merged result

  • Iterate through both lists and compare elements

  • Add the smaller element to the new list and move to the next element in that list

  • Repeat until all elements have been added to the new list

  • Return the new merged list

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Senior Java Developer Interview Questions from Similar Companies

3.7
 • 24 Interview Questions
3.6
 • 23 Interview Questions
3.8
 • 19 Interview Questions
3.7
 • 16 Interview Questions
3.7
 • 13 Interview Questions
3.7
 • 10 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