Add office photos
Employer?
Claim Account for FREE

HARMAN

3.8
based on 2.6k Reviews
Filter interviews by

10+ Interview Questions and Answers

Updated 15 May 2024
Popular Designations

Q1. Write a method for deletion of a node from a Linked List.

Ans.

Method for deleting a node from a Linked List

  • Find the node to be deleted

  • Update the previous node's next pointer to skip the deleted node

  • Free the memory occupied by the deleted node

View 1 answer

Q2. Write a code to check if two strings are anagrams of each other.

Ans.

Code to check if two strings are anagrams of each other.

  • Create two character arrays from the strings

  • Sort the arrays

  • Compare the sorted arrays

Add your answer

Q3. How to make a custom immutable class in java?

Ans.

Creating a custom immutable class in Java

  • Make the class final

  • Make all fields private and final

  • Do not provide any setter methods

  • Provide a constructor to initialize all fields

  • Override equals() and hashCode() methods

  • Prevent modification of mutable objects passed in constructor

Add your answer

Q4. why is string immutable

Ans.

String is immutable because it ensures data integrity and allows for efficient memory management.

  • Immutable strings prevent accidental modification of data.

  • Immutable strings can be easily shared and reused, improving memory efficiency.

  • Immutable strings enable efficient string interning and caching.

  • Immutable strings support thread safety in concurrent environments.

View 1 answer
Discover null interview dos and don'ts from real experiences

Q5. Time complexity of linked lists operations

Ans.

Time complexity of linked list operations is O(n) for traversal, insertion and deletion.

  • Traversal, insertion and deletion in linked lists take linear time.

  • Insertion and deletion at the beginning of the list is faster than at the end.

  • Doubly linked lists have slightly higher time complexity due to maintaining two pointers.

Add your answer

Q6. do @requestparam has default value

Ans.

Yes, @RequestParam has a default value if not specified.

  • If a @RequestParam is not provided in the request, it will use its default value.

  • The default value can be set using the 'defaultValue' attribute of @RequestParam annotation.

  • If no default value is specified, the parameter will be considered as required and an exception will be thrown if not provided.

Add your answer
Are these interview questions helpful?

Q7. why abstract class is required

Ans.

Abstract classes are required to provide a common interface and share code among related classes.

  • Abstract classes allow for code reusability and promote modular design.

  • They provide a common interface for a group of related classes.

  • Abstract classes can define abstract methods that must be implemented by subclasses.

  • They can also provide default implementations for common methods.

  • Abstract classes cannot be instantiated, but can be used as a reference type.

Add your answer

Q8. what is using namespace std; ?

Ans.

using namespace std; is a directive in C++ that allows the programmer to use all elements of the standard C++ library without specifying the std:: prefix.

  • It is used to avoid having to write std:: before standard library elements.

  • It should be used with caution as it can lead to naming conflicts.

  • Example: cout << 'Hello, World!'; instead of std::cout << 'Hello, World!';

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

Q9. How to reverse a string?

Ans.

To reverse a string, iterate through the string and append each character to a new string in reverse order.

  • Create an empty string to store the reversed string

  • Iterate through the original string from the end to the beginning

  • Append each character to the new string

  • Return the new string

Add your answer

Q10. what is polymorphism ?

Ans.

Polymorphism is the ability of a function or method to behave differently based on the object it is acting upon.

  • Polymorphism allows objects of different classes to be treated as objects of a common superclass.

  • There are two types of polymorphism: compile-time (method overloading) and runtime (method overriding).

  • Example: Animal class with methods like eat() can be inherited by classes like Dog and Cat, which can override the eat() method.

Add your answer

Q11. why we need ood ?

Ans.

OOD (Object-Oriented Design) is essential for creating modular, reusable, and maintainable software systems.

  • OOD helps in organizing code into manageable components

  • Encourages code reusability through inheritance and polymorphism

  • Facilitates easier maintenance and updates

  • Promotes scalability and flexibility in software development

  • Enables better collaboration among team members

Add your answer

Q12. write sorting algorithm ?

Ans.

A sorting algorithm is a method used to arrange elements in a specific order.

  • Common sorting algorithms include Bubble Sort, Selection Sort, Insertion Sort, Merge Sort, Quick Sort, and Heap Sort.

  • Bubble Sort compares adjacent elements and swaps them if they are in the wrong order.

  • Merge Sort divides the array into two halves, sorts them separately, and then merges them back together.

  • Quick Sort picks a pivot element and partitions the array around the pivot.

  • Heap Sort builds a max...read more

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at null

based on 5 interviews in the last 1 year
1 Interview rounds
Technical 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.5
 • 50 Interview Questions
3.2
 • 36 Interview Questions
3.7
 • 19 Interview Questions
4.2
 • 17 Interview Questions
4.3
 • 17 Interview Questions
4.6
 • 11 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
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

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