Oracle
100+ Diligenta 2 Interview Questions and Answers
Q1. Puzzle: – Two persons X and Y are sitting side by side with a coin in each’s hand. The game is to simultaneously flip the coin till anyone wins. Player X will win if he gets a consecutive HEAD, TAIL however Y w...
read moreThe game is not fair.
Player X has a higher chance of winning as they only need to get a consecutive HEAD, TAIL.
Player Y needs to get a consecutive HEAD, HEAD which is less likely to occur.
The probability of Player X winning is higher than Player Y winning.
Q2. In a bag you have 20 black balls and 16 red balls.When you take out 2 black balls you take another white ball.If you take 2 white balls then you take out 1 black ball and if balls are of different color you tak...
read moreThe last ball that will be left is black.
When you take out 2 black balls, you take another white ball.
If you take 2 white balls, you take out 1 black ball.
If balls are of different color, you take out another black ball.
Since there are more black balls initially, the last ball will be black.
Q3. Design a website similar to bookmyshow.com for booking cinema tickets but it must be for a single location only which can have multiple theatres in it. In this he wanted me to design a basic rough GUI, relevant...
read moreDesign a website similar to bookmyshow.com for booking cinema tickets for a single location with multiple theatres.
Design a user-friendly GUI with options for advance booking, user login, user registration, movie rating, and saving card details.
Create relevant database tables to store information about movies, theatres, bookings, user details, and card details.
Link the GUI to the database to enable data flow and retrieval.
Implement features like advance booking, where users c...read more
Q4. Provided a string a character and a count, you have to print the string after the specified character has occurred count number of times. Ex: String: “This is demo string” Character: ‘i’ Count: 3 Output: “ng” H...
read moreThe program prints the substring after a specified character has occurred a certain number of times in a given string.
Iterate through the string to find the specified character.
Keep track of the count of occurrences of the character.
Once the count reaches the specified count, extract the substring after that position.
Handle corner cases such as when the character is not in the string or when it doesn't occur the specified number of times.
You are given an array 'ARR' of 'N' positive integers. Your task is to find if we can partition the given array into two subsets such that the sum of elements in both subsets is equal....read more
Q6. There are five glasses that are kept upside down.At a time you are bound to turn four glasses.Give minimum number of times in which you can turn back all the glasses so that now none among them are upside down
Minimum number of times to turn all glasses upside down when 4 can be turned at a time.
Turn over any four glasses, leaving one untouched.
Repeat the above step until only one glass is left upside down.
Finally, turn over the last glass to complete the task.
Minimum number of turns required is 3.
You are given an N * N matrix of integers where each row and each column is sorted in increasing order. You are given a target integer 'X'. Find the position of...read more
Q8. Code: – Given the value of a starting position and an ending position, you have to reach from start to end in a linear way, and you can move either to position immediate right to current position or two step ri...
read morePrint all possible paths from start to end in a linear way, moving either one or two steps right.
Use dynamic programming to solve the problem
Create a 2D array to store the number of paths to each position
Start from the end position and work backwards
At each position, calculate the number of paths by summing the number of paths from the next two positions
Print all the paths by backtracking from the start position
You are given a string of length N. You need to reverse the string word by word. There can be multiple spaces between two words and there can be leading or trailing spaces but in the ou...read more
You are given an array consisting of 0s and 1s. You need to find the length of the largest subarray with an equal number of 0s and 1s.
For example:
If the given ar...read more
You are given the arrival and departure times of N trains at a railway station in a day. You need to find the minimum of platforms required for the railway station such that no ...read more
Given a string “STR”, you need to remove spaces from the string “STR” and rewrite in the Pascal case. Your task is to return the string “STR”.
In the Pascal case writing style we ...read more
Q13. Write a code for inserting two numbers in a text file given n2>n1 and the next entry should not be overlapping like if first was 4,6 next can't be 5,7.the second n1 has to be greater than first n2
The code inserts two numbers in a text file, ensuring that the second number is greater than the first and there is no overlap between entries.
Read the existing entries from the text file
Check if the new numbers satisfy the conditions
If conditions are met, insert the new numbers into the file
Otherwise, display an error message
You're given string ‘STR’ consisting solely of “{“, “}”, “(“, “)”, “[“ and “]” . Determine whether the parentheses are balanced.
Input Format:
The first line contains an Integer 'T' which denot...read more
1. He asked me to write an SQL query, “Given a table with duplicate rows, remove duplicate rows from table”. I was not able to solve this question.
2. He asked me to write an SQL query, “Given empl...read more
For a given binary tree, convert it to its sum tree. That is, replace every node data with sum of its immediate children, keeping leaf nodes 0. Finally, return its preorder.
For example:
The input for t...read more
You are given a square matrix of non-negative integers of size 'N x N'. Your task is to rotate that array by 90 degrees in an anti-clockwise direction without using any extra spac...read more
You are given a graph with 'N' vertices numbered from '1' to 'N' and 'M' edges. You have to colour this graph in two different colours, say blue and red such that no two vertices connected by an...read more
Given an integer number ‘num’. Your task is to convert ‘num’ into a word.
Suppose the given number ‘num’ is ‘9823’ then you have to return a string “nine thousand eight hundred tw...read more
Q20. Write code to find the middle element of a linked list
Code to find the middle element of a linked list
Traverse the linked list with two pointers, one moving twice as fast as the other
When the fast pointer reaches the end, the slow pointer will be at the middle element
If the linked list has even number of elements, return the second middle element
Q21. Write a code to count the number of times '1' occurs from 1 to 999999
Code to count the number of times '1' occurs from 1 to 999999
Loop through all numbers from 1 to 999999
Convert each number to a string and count the number of '1's in it
Add the count to a running total
Return the total count
Q22. Given a matrix.Write a code to print the transpose of the matrix
The code prints the transpose of a given matrix.
Iterate through each row and column of the matrix.
Swap the elements at the current row and column with the elements at the current column and row.
Print the transposed matrix.
Q23. Puzzle: Gi1ven 4 coins, arrange then to make maximum numbers of triangle of the figure
Arrange 4 coins to make maximum number of triangles
Place 3 coins in a triangle formation and the fourth coin in the center to form 4 triangles
Place 2 coins on top of each other and the other 2 coins on either side to form 2 triangles
Place 2 coins in a line and the other 2 coins on either side to form 2 triangles
Q24. Puzzle: Given 10 coins, arrange them such that we get 4 different rows each containing 4 coins
Arrange 10 coins in 4 rows of 4 coins each.
Place 4 coins in a row and keep the remaining 6 aside.
Place 3 coins from the remaining 6 in the next row and keep the remaining 3 aside.
Place 2 coins from the remaining 3 in the third row and keep the remaining 1 aside.
Place the last coin in the fourth row along with the remaining 1 coin from step 3.
The final arrangement will have 4 rows with 4 coins each.
Let's say I give you a number 1,53,345 (I don't remember exactly). Write a program that will take the above number as input array and give output as "One Lakh Fifty-Three Thousand Three Hundre...read more
What is a virtual function? Give an example.
What is encapsulation? What is polymorphism?
Q27. Explain multitasking and multiprogramming
Multitasking is the ability of an operating system to run multiple tasks concurrently while multiprogramming is the ability to run multiple programs concurrently.
Multitasking allows multiple tasks to run concurrently on a single processor system.
Multiprogramming allows multiple programs to run concurrently on a single processor system.
Multitasking is achieved through time-sharing, where the processor switches between tasks at a very high speed.
Multiprogramming is achieved thr...read more
Q28. What is the difference between a micro controller and a micro processor?
Microcontroller is a self-contained system with memory, peripherals and processor, while microprocessor only has a processor.
Microcontroller has on-chip memory and peripherals, while microprocessor requires external memory and peripherals.
Microcontroller is used in embedded systems, while microprocessor is used in general-purpose computing.
Examples of microcontrollers include Arduino, PIC, and AVR, while examples of microprocessors include Intel Pentium, AMD Ryzen, and ARM Co...read more
SQL query - Top 2 users in a table - do it using subquery, views, and joins.
SQL query - Nested query using joins.
If I want to implement a stack then what should the value of the pointer (top of stack) in case of an empty stack? 0 or -1?
Q31. Can an array have elements of different data types?
Yes, an array can have elements of different data types.
An array can have elements of different data types, but it's not recommended.
It can make the code harder to read and maintain.
For example, an array can have both strings and numbers: ['apple', 5, 'banana']
Q32. Design circular doubly linked list with all operations.
Circular doubly linked list is a data structure where each node has a reference to both the next and previous nodes, forming a circular loop.
Create a Node class with data, next, and prev pointers
Implement operations like insert, delete, search, and display
Ensure the last node's next pointer points to the first node and the first node's prev pointer points to the last node
Q33. Different types of searching and sorting algo discussion.
Searching and sorting algorithms are essential in programming for efficiently organizing and retrieving data.
Searching algorithms: linear search, binary search, depth-first search, breadth-first search
Sorting algorithms: bubble sort, selection sort, insertion sort, merge sort, quick sort
Examples: Searching for a specific item in a list, sorting a list of numbers in ascending order
You have been given a column title as appears in an Excel sheet, return its corresponding column number.
Find the degree between an hour hand and a minute hand? Gave me a pen and paper to come up with the answer (it was an equation).
Q36. Modified Balanced Parentheses where a character can be matched with any other character, i.e. / with &, ! with ? and so on.
Modified Balanced Parentheses where characters can be matched with any other character.
Use a stack to keep track of opening characters
When encountering a closing character, check if it matches the top of the stack
If it matches, pop from the stack, else return false
Continue until end of string, return true if stack is empty
You are given a positive number ‘N.’ You need to find all the numbers such that the sum of digits of those numbers to the number itself is equal to ‘N.’
For example:
You are given ‘N’ as 21, th...read more
Q38. Given an array of strings, print all the possible combinations of strings created by picking one character from each string of the array. The individual strings do not contain any duplicates. Ex: {ABC, DE} Ans ...
read morePrint all possible combinations of strings by picking one character from each string in the array.
Iterate through each character of the first string and combine it with each character of the second string.
Repeat the process for all strings in the array to get all possible combinations.
Use nested loops to generate combinations efficiently.
You are given an array 'nums' consisting of first N positive integers. But from the N integers, one of the integers occurs twice in the array, and one of the integers is mis...read more
Q40. What is a linked list ? What are its uses?
A linked list is a linear data structure where each element is a separate object linked together by pointers.
Linked list is used to implement stacks, queues, and hash tables.
It is used in computer memory allocation.
It is used in image processing to represent pixels.
It is used in music player to create a playlist.
It is used in web browsers to store the history of visited web pages.
Q42. What are data structures?
Data structures are ways of organizing and storing data in a computer so that it can be accessed and used efficiently.
Data structures can be linear or non-linear
Examples of linear data structures include arrays, linked lists, and stacks
Examples of non-linear data structures include trees and graphs
Choosing the right data structure is important for optimizing performance and memory usage
Write SQL query to get Nth highest salary
Q45. Given a date in string format, write a java program to return the date n days after the given date. Solve the question without using DateTimeFormatter or any similar Date parsing libraries.
Java program to calculate date n days after given date without using Date parsing libraries.
Parse the input date string to extract day, month, and year components.
Calculate the total number of days represented by the input date.
Add the specified number of days to the total days calculated.
Convert the final total days back to day, month, and year components to get the new date.
You are given two Strings 'P' and 'Q' of equal length. Your task is to check whether String 'P' can be converted into String 'Q' by cyclically rotating it to t...read more
You have been given ‘K’ different arrays/lists, which are sorted individually (in ascending order). You need to merge all the given arrays/list such that the output array/list should be sor...read more
Q48. Largest element in window size K
Find the largest element in a window of size K in an array.
Iterate through the array and maintain a deque to store the indices of elements in decreasing order.
Remove indices from the front of the deque that are outside the current window.
The front of the deque will always have the index of the largest element in the current window.
Q49. Tell me about the OS your phone uses? What are the other phone operating systems available in the market
My phone uses iOS. Other phone operating systems available in the market are Android, Windows, and Blackberry OS.
iOS is developed by Apple and is exclusive to iPhones and iPads.
Android is developed by Google and is used by various phone manufacturers such as Samsung, LG, and HTC.
Windows is developed by Microsoft and is used by Nokia and other phone manufacturers.
Blackberry OS is developed by Blackberry and is exclusive to Blackberry phones.
Q50. Explain about the transaction that happen in a bank
Transactions in a bank involve the movement of funds between accounts or the exchange of currency.
Transactions can be initiated by customers or by the bank itself
Common types of transactions include deposits, withdrawals, transfers, and loans
Transactions are recorded in the bank's ledger and may be subject to fees or interest
Electronic transactions have become increasingly popular, such as online banking and mobile payments
Q51. Print all combinations of numbers in an array which sum up to a number k. Ex : Arr={3,1,4,5} k=5 Ans : {{1,4},{5}}
Use backtracking to find all combinations of numbers in an array that sum up to a given number.
Start by sorting the array in non-decreasing order to easily identify combinations.
Use backtracking to recursively find all combinations that sum up to the target number.
Keep track of the current combination and the remaining sum as you traverse the array.
Add the current combination to the result when the sum equals the target number.
You have been given an array/list 'PREORDER' representing the preorder traversal of a BST with 'N' nodes. All the elements in the given array have distinct values.
Your task is to const...read more
Given an array ARR of N integers and an integer S. The task is to find whether there exists a subarray(positive length) of the given array such that the sum of elements of the subarray eq...read more
Given a string of integers ‘bin’. Return 'true' if the string represents a valid binary number, else return 'false'. A binary number is a number that has only 0 or 1 in it.
Input Format...read more
You are given an array/list 'NUM' of integers. You are supposed to rearrange the elements of the given 'NUM' so that after rearranging the given array/list there are no two adjacent elements ...read more
Q56. Given array contain duplicate elements need to remove duplicates and after deletion oreder of remaining element should remain same..
Remove duplicates from array of strings while maintaining original order.
Iterate through the array and use a Set to keep track of unique elements.
Add elements to a new array only if they are not already in the Set.
You are given a string 'STR'. The string contains [a-z] [A-Z] [0-9] [special characters]. You have to find the reverse of the string.
For example:
If the given string is: STR = "abcde". You hav...read more
Given a Binary Search Tree (BST) and a range [min, max], remove all keys which are outside the given range. The modified tree should also be BST.
Input format:
The first l...read more
Q59. Sql query using joins
SQL query using joins
Use JOIN keyword to combine rows from two or more tables based on a related column between them
Types of joins include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN
Example: SELECT * FROM table1 INNER JOIN table2 ON table1.column = table2.column
Q60. Print all Pythagorean triplets within a given range.
Print Pythagorean triplets within a given range.
Iterate through all possible combinations of a, b, and c within the given range
Check if a^2 + b^2 = c^2 for each combination
Print the triplets that satisfy the Pythagorean theorem
Given a binary tree with 'N' number of nodes, convert it to a Greater Tree such that data of every node of the original BST is changed to the original node’s data plus the sum of all node’s d...read more
Q62. Design Tic Tac Toe
Design a Tic Tac Toe game
Create a 3x3 grid to represent the game board
Allow two players to take turns marking X and O on the grid
Check for win conditions after each move to determine the winner
Handle tie game if all spaces are filled without a winner
Q63. Check if given string has Balanced Parentheses.
Check if a string has balanced parentheses.
Use a stack to keep track of opening parentheses.
Iterate through the string and push opening parentheses onto the stack.
When a closing parenthesis is encountered, pop from the stack and check if it matches the closing parenthesis.
If stack is empty at the end and all parentheses are matched, the string has balanced parentheses.
You have 10 coins one of them is defective. You have a weight scale. How will you identify the defective coin?
How to find the pre order traversal of a tree?
State complexity of merge sort
Questions based on radix sort
What will be the result when we will add two binary numbers in 64Bit and 32 Bit operating system?
Q67. Describe in steps how you downloaded any software recently
I recently downloaded VLC media player.
Visited the official website of VLC media player
Clicked on the download button
Selected the appropriate version for my operating system
Waited for the download to complete
Opened the downloaded file and followed the installation wizard
Q68. Guesstimate - how many flights are handled by Bangalore airport on a daily basis
Around 600 flights are handled by Bangalore airport on a daily basis.
Bangalore airport is one of the busiest airports in India
It handles both domestic and international flights
On average, there are around 25-30 flights per hour
The number of flights may vary depending on the day of the week and time of the year
Q69. Common Elements in two Sorted Linked List
Finding common elements in two sorted linked lists.
Traverse both lists simultaneously using two pointers.
Compare the values of the nodes pointed by the two pointers.
If they are equal, add the value to the result list and move both pointers.
If not, move the pointer pointing to the smaller value.
Repeat until one of the lists is fully traversed.
Q70. Predict Output based on whether static variables can be accessed from non-static method
Static variables can be accessed from non-static methods using an object reference or by making the variable non-static.
Static variables can be accessed from non-static methods by creating an object of the class containing the static variable.
Alternatively, the static variable can be made non-static to be accessed directly from a non-static method.
Attempting to access a static variable directly from a non-static method will result in a compilation error.
Q71. String a = "Something" String b = new String("Something") How many object created?
Two objects created - one in the string pool and one in the heap.
String 'a' is created in the string pool, while String 'b' is created in the heap.
String pool is a special area in the heap memory where strings are stored to increase reusability and save memory.
Using 'new' keyword always creates a new object in the heap, even if the content is the same as an existing string in the pool.
Q72. String a = "Something" a.concat(" New") What will be garbage collected?
Only the original string 'Something' will be garbage collected.
The concat method in Java does not modify the original string, but instead returns a new string with the concatenated value.
In this case, 'a' remains as 'Something' and a new string 'Something New' is created, but not assigned to any variable.
Since the new string is not stored in any variable, it will not be garbage collected.
Q73. Delete nth node from end of linked list
Delete nth node from end of linked list
Use two pointers, one to traverse the list and another to keep track of the nth node from the end
Once the nth node is reached, move both pointers until the end of the list
Delete the node pointed by the second pointer
Q74. Write code two merge and remove duplicates from two sorted arrays with any Collections
Merge and remove duplicates from two sorted arrays without using Collections
Use two pointers to iterate through both arrays simultaneously
Compare elements at each pointer and add the smaller one to the result array
Skip duplicates by checking if the current element is equal to the previous element
Q75. Kth element after merging two sorted arrays
Finding the Kth element after merging two sorted arrays.
Merge the two sorted arrays into a single array.
Sort the merged array.
Return the Kth element from the merged and sorted array.
Q76. Difference between 'having' clause and 'where' clause in MySQL
HAVING clause is used with GROUP BY to filter groups, WHERE clause is used to filter rows.
HAVING clause is used with GROUP BY clause to filter groups based on aggregate functions.
WHERE clause is used to filter rows based on conditions.
HAVING clause is used after GROUP BY clause, while WHERE clause is used before GROUP BY clause.
HAVING clause can use aggregate functions, while WHERE clause cannot.
Example: SELECT category, COUNT(*) FROM products GROUP BY category HAVING COUNT(*...read more
There were 5 statements code snippets in python. I was told to write that in Java.
Q78. What is inheritance in oops
Inheritance in OOP allows a class to inherit properties and behaviors from another class.
Inheritance promotes code reusability by allowing a new class to use the properties and methods of an existing class.
The class that is being inherited from is called the base class or parent class, while the class that inherits is called the derived class or child class.
Derived classes can add new properties and methods, or override existing ones from the base class.
Example: class Animal ...read more
Q79. What is oops?
OOPs stands for Object-Oriented Programming. It is a programming paradigm based on the concept of objects.
OOPs is a way of organizing and designing code around objects
It emphasizes on encapsulation, inheritance, and polymorphism
It helps in creating reusable and modular code
Examples of OOPs languages are Java, C++, Python, etc.
Q80. Write code to emulate Producer/Consumer Problem
Emulate Producer/Consumer Problem using code
Create a shared buffer between producer and consumer
Use synchronization mechanisms like mutex or semaphore to control access to the buffer
Implement producer and consumer functions to add and remove items from the buffer respectively
Q81. What knowledge to you have about PL/SQL?
PL/SQL is a procedural language designed specifically for the Oracle Database management system.
PL/SQL is used to create stored procedures, functions, triggers, and packages in Oracle databases.
It is a block-structured language that allows developers to write code in logical blocks.
PL/SQL supports data types such as VARCHAR2, NUMBER, DATE, BOOLEAN, etc.
It also supports control structures like IF-THEN-ELSE, FOR LOOP, WHILE LOOP, etc.
PL/SQL can be used to manipulate data in Ora...read more
Q82. Sort using frequency
Sort an array of strings based on their frequency of occurrence.
Create a frequency map to count the occurrences of each string
Sort the strings based on their frequency in descending order
If two strings have the same frequency, sort them lexicographically
Return the sorted array
Q83. What is Function overloading and overriding?
Function overloading is having multiple functions with the same name but different parameters. Function overriding is redefining a function in a subclass.
Function overloading allows multiple functions with the same name but different parameters.
Function overriding involves redefining a function in a subclass with the same name and parameters as in the superclass.
Example of function overloading: int add(int a, int b) and float add(float a, float b)
Example of function overridin...read more
Q84. Camel banana problem
The Camel Banana problem is a puzzle that involves calculating the number of bananas a camel can eat.
The problem involves a camel that can carry a certain weight and a number of bananas with different weights.
The camel can only carry a maximum weight and can only eat a certain number of bananas.
The goal is to determine the maximum number of bananas the camel can eat without exceeding its weight limit.
Q85. Rotate a linked list
Rotate a linked list
Create a new node and make it the head
Traverse the list to find the tail and connect it to the old head
Update the tail to point to null
Handle edge cases like empty list or rotating by 0 positions
Q86. Write code to create a deadlock
Creating a deadlock involves two or more threads waiting for each other to release a resource they need.
Create two threads, each trying to lock two resources in a different order
Ensure that one thread locks resource A first and then tries to lock resource B, while the other thread locks resource B first and then tries to lock resource A
This will result in a situation where each thread is waiting for the other to release the resource it needs, causing a deadlock
Q87. Write code to implement LRU Cache
Implement LRU Cache using a data structure like LinkedHashMap in Java
Use LinkedHashMap to maintain insertion order
Override removeEldestEntry method to limit cache size
Update the access order on get and put operations
Q88. Product of an array except self
Calculate the product of all elements in an array except for the element itself.
Iterate through the array and calculate the product of all elements except the current element.
Use two separate arrays to store the product of elements to the left and right of the current element.
Multiply the corresponding elements from the left and right arrays to get the final result.
Q89. How can you divide a cake into 8 parts only 3 cuts allowed
To divide a cake into 8 parts with only 3 cuts, make two perpendicular cuts to create 4 equal pieces, then cut each of those pieces in half.
Make a horizontal cut across the middle of the cake to create 2 equal halves.
Make a vertical cut through the middle of the cake to create 4 equal quarters.
Make a diagonal cut through each quarter to create 8 equal parts.
Q90. Write a program to separate strong for special characters
Program to separate strong for special characters in an array of strings
Iterate through each string in the array
For each string, iterate through each character
Check if the character is a special character and separate it into a new string if it is
Q91. Difference between POJO and Bean
POJO is a Plain Old Java Object with private fields and public getters/setters, while a Bean is a Java class with private fields and public zero-argument constructors.
POJO stands for Plain Old Java Object
POJO has private fields and public getters/setters
Bean is a Java class with private fields and public zero-argument constructors
Beans are usually used in Java EE frameworks like Spring for dependency injection
Q92. Write code to start 5 threads
Code to start 5 threads in Java
Create a class that implements the Runnable interface
Instantiate 5 objects of the class
Create 5 threads using the objects and start them
Q93. Write code to read a file
Code to read a file in Java
Use FileReader and BufferedReader classes to read the file
Handle exceptions using try-catch blocks
Close the file after reading using close() method
Q94. Find second highest vowel occurance in a string
Find the second highest occurrence of a vowel in a string.
Iterate through the string and count the occurrences of each vowel (a, e, i, o, u).
Store the counts in an array and find the second highest count.
Return the vowel with the second highest count.
Q95. Singleton Pattern in details
Singleton pattern ensures a class has only one instance and provides a global point of access to it.
Ensures a class has only one instance by providing a global access point to it.
Uses a private constructor to restrict instantiation of the class.
Provides a static method to access the singleton instance.
Commonly used in scenarios where only one instance of a class is needed, such as database connections or logging.
Example: Singleton pattern can be implemented in Java using a pr...read more
Q96. count no of links in as web page
To count the number of links on a web page, you can use a web scraping tool or inspect the page's HTML code.
Use a web scraping tool like BeautifulSoup or Selenium to extract all the links from the webpage.
Inspect the HTML code of the webpage and look for anchor tags () which contain the links.
Count the number of anchor tags to determine the total number of links on the webpage.
Q97. Write locator for element in webpage
Use CSS selector to locate element on webpage
Use unique id or class names to locate element
Use CSS selectors like 'id', 'class', 'name', 'tag name', etc.
Use XPath if necessary for complex element locating
Q98. Normalization of database to BCNF
Normalization to BCNF ensures that every non-trivial functional dependency is satisfied.
Identify all functional dependencies
Eliminate partial dependencies
Eliminate transitive dependencies
Ensure every determinant is a candidate key
Q99. how do we measure code quality?
Code quality can be measured through various metrics and tools to ensure readability, maintainability, efficiency, and reliability.
Use code review processes to assess adherence to coding standards and best practices
Utilize static code analysis tools to identify potential bugs, code smells, and security vulnerabilities
Measure code complexity using metrics like cyclomatic complexity and maintainability index
Track code coverage with unit tests to ensure adequate test coverage
Mon...read more
Q100. What is Polymorphism?
Polymorphism is the ability of an object to take on many forms.
Polymorphism allows objects of different classes to be treated as objects of a common superclass.
It enables methods to be overridden in a subclass to provide different implementations.
Polymorphism enhances code reusability and flexibility.
Example: A superclass 'Animal' with subclasses 'Dog' and 'Cat' can be treated as 'Animal' objects.
Example: Method 'draw()' in superclass 'Shape' can be overridden in subclasses '...read more
More about working at Oracle
Top HR Questions asked in Diligenta 2
Interview Process at Diligenta 2
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month