0% found this document useful (0 votes)
36 views1 page

Oracle Interview Questions 1735103031

The document provides a list of programming tasks with hints for solving each one, including separating odd and even numbers, removing duplicates, counting character frequencies, sorting lists, and finding maximum and minimum values. It emphasizes the use of loops, collections, and sorting algorithms to achieve the desired outcomes. Each task is presented with a brief description and a suggested approach for implementation.

Uploaded by

xdsgn2825k
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views1 page

Oracle Interview Questions 1735103031

The document provides a list of programming tasks with hints for solving each one, including separating odd and even numbers, removing duplicates, counting character frequencies, sorting lists, and finding maximum and minimum values. It emphasizes the use of loops, collections, and sorting algorithms to achieve the desired outcomes. Each task is presented with a brief description and a suggested approach for implementation.

Uploaded by

xdsgn2825k
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

LinkedIn: bishnoisuresh

1. Separate odd and even numbers in a list of integers:


[Hint]: Use a loop to iterate over the list and apply a modulo operation (% 2) to separate odd
and even numbers.
2. Remove duplicate elements from a list:
[Hint]: Traverse the list while adding elements to a collection that ensures uniqueness, like a
Set, and then convert it back to a list.
3. Find the frequency of each character in a string:
[Hint]: Iterate through the string and use a map-like structure to count occurrences of each
character.
4. Find the frequency of each element in an array or a list:
[Hint]: Traverse the array or list, and store the count of each element in a map structure.
5. Sort a given list of decimals in reverse order:
[Hint]: Sort the list using a custom comparator to order elements in descending order.
6. Join a list of strings with '[' as prefix, ']' as suffix, and ',' as delimiter:
[Hint]: Concatenate strings using a loop or a StringBuilder while appending the specified
prefix, suffix, and delimiter.
7. Print the numbers from a given list of integers that are multiples of 5:
[Hint]: Check divisibility of each number using the modulo operation (% 5 == 0) and print
matching numbers.
8. Find the maximum and minimum of a list of integers:
[Hint]: Traverse the list while maintaining two variables to track the current maximum and
minimum.
9. Merge two unsorted arrays into a single sorted array:
[Hint]: Combine the two arrays into a larger array and sort it using sorting algorithms like
quicksort or mergesort.
10. Merge two unsorted arrays into a single sorted array without duplicates:
[Hint]: Combine the arrays, store the elements in a collection that enforces uniqueness, and
then sort the result.
11. Get the three maximum and three minimum numbers from a given list of integers:
[Hint]: Sort the list, then extract the first three and last three elements using indexing.
12. Check if two strings are anagrams or not:
[Hint]: Sort the characters of both strings and compare the sorted results for equality.
13. Find the sum of all digits of a number:
[Hint]: Use a loop to extract each digit using % 10, sum the digits, and reduce the number by
/ 10.
14. Find the second largest number in an integer array:
[Hint]: Iterate through the array while maintaining variables for the largest and second-
largest numbers.

LinkedIn: bishnoisuresh

You might also like