Questions related to arrays, such as given a 2 integer array, find the common elements.



Questions related to arrays, such as given a 2 integer array, find the common elements...

Answer / Roopali Sharma

To find common elements in two arrays, you can use a for loop and nested if statements. First, iterate through both arrays. For each element in the first array, check if it exists in the second array using an if statement. If it does, print or store the common element.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

Is array immutable?

1 Answers  


What is a treeset?

1 Answers  


How will you represent a linked list in a graphical view?

1 Answers  


How do treesets work internally?

1 Answers  


You want to insert a new item in a binary search tree. How would you do it?

1 Answers  


List the data structures which are used in hierarchical data model.

1 Answers  


Which type of sorting is best?

1 Answers  


Define level of the tree?

1 Answers  


What are binary search and fibonacci search?

1 Answers  


What are data structures in programming?

1 Answers  


What is a queue in data structure?

1 Answers  


Differentiate between list and set.

1 Answers  


Categories