Oracle
The event hub Interview Questions and Answers
Number and Digits Problem Statement
You are provided with a positive integer N
. Your task is to identify all numbers such that the sum of the number and its digits equals N
.
Example:
Input:
N = 21
Output:
[15]
Q2. Preorder Traversal to BST Problem Statement
Given an array or list PREORDER
representing the preorder traversal of a Binary Search Tree (BST) with N
nodes, construct the BST which matches the given preorder tra...read more
Q3. Check if a Number is Binary
Determine if a given string of integers bin
represents a valid binary number. Return 'true'
if the string represents a valid binary number, otherwise return 'false'
. A binary number ...read more
Q4. Rearrange The Array Problem Statement
You are given an array/list 'NUM' of integers. Rearrange the elements of 'NUM' such that no two adjacent elements are the same in the rearranged array.
Example:
Input:
NUM[...read more
Q5. Reverse a String Problem Statement
Given a string STR
containing characters from [a-z], [A-Z], [0-9], and special characters, determine the reverse of the string.
Input:
The input starts with a single integer '...read more
Q7. What is singleton class
A singleton class is a class that can only have one instance created at a time.
Singleton classes are often used for managing resources that should only have one instance, such as a database connection.
They are implemented by making the constructor private and providing a static method to access the single instance.
Singleton classes can also be used for global state management in an application.
In Java, the Singleton pattern can be implemented using the enum type.
Singleton cla...read more
More about working at Oracle
Reviews
Interviews
Salaries
Users/Month