Oracle Interview Questions
- 1of 1 vote
AnswersImplement the stack using queue
- kalungedamaji1137 February 09, 2014 in India| Report Duplicate | Flag | PURGE
Oracle Financial Software Developer Algorithm - 0of 2 votes
AnswersImplement an algorithm to delete a node in the middle of a single linked list, given
- .·´¯`·.´¯`·.¸¸.·´¯`·.¸><(((º> January 28, 2014 in -| Report Duplicate | Flag | PURGE
Oracle Software Engineer / Developer Algorithm - -1of 1 vote
AnswersImplement an algorithm to find the nth to last element of a singly linked list.
- .·´¯`·.´¯`·.¸¸.·´¯`·.¸><(((º> January 28, 2014 in -| Report Duplicate | Flag | PURGE
Oracle Software Engineer / Developer Algorithm - -1of 1 vote
AnswersReverse of a LinkedList
- .·´¯`·.´¯`·.¸¸.·´¯`·.¸><(((º> January 28, 2014 in -
follow up
Can you do it recursively?| Report Duplicate | Flag | PURGE
Oracle Software Engineer / Developer Algorithm - 0of 0 votes
AnswersDesign an algorithm and write code to remove the duplicate characters in a string without using any additional buffer. NOTE: One or two additional variables are fine.
- .·´¯`·.´¯`·.¸¸.·´¯`·.¸><(((º> January 25, 2014| Report Duplicate | Flag | PURGE
Oracle Software Engineer / Developer Algorithm - 0of 0 votes
AnswersWrite a method to decide if two strings are anagrams or not.
- .·´¯`·.´¯`·.¸¸.·´¯`·.¸><(((º> January 25, 2014| Report Duplicate | Flag | PURGE
Oracle Software Engineer / Developer Algorithm - 0of 0 votes
AnswersWrite a method to replace all spaces in a string with '%20'.
- .·´¯`·.´¯`·.¸¸.·´¯`·.¸><(((º> January 25, 2014| Report Duplicate | Flag | PURGE
Oracle Software Engineer / Developer Algorithm - 1of 1 vote
AnswersGiven an image represented by an NxN matrix, where each pixel in the image is 4 bytes, write a method to rotate the image by 90 degrees. Can you do this in place
- .·´¯`·.´¯`·.¸¸.·´¯`·.¸><(((º> January 25, 2014| Report Duplicate | Flag | PURGE
Oracle Software Engineer / Developer Algorithm - 0of 0 votes
AnswersAssume you have a method isSubstring which checks if one word is a substring of another. Given two strings, s1 and s2, write code to check if s2 is a rotation of s1 using only one call to isSubstring (i.e., “waterbottle” is a rotation of “erbottlewat”).
- .·´¯`·.´¯`·.¸¸.·´¯`·.¸><(((º> January 25, 2014| Report Duplicate | Flag | PURGE
Oracle Software Engineer / Developer Algorithm - 1of 1 vote
AnswersYou have two very large binary trees: T1, with millions of nodes, and T2, with hundreds of nodes. Create an algorithm to decide if T2 is a subtree of T1.
- .·´¯`·.´¯`·.¸¸.·´¯`·.¸><(((º> January 23, 2014| Report Duplicate | Flag | PURGE
Oracle Software Engineer / Developer Algorithm - 0of 0 votes
AnswersGiven a binary search tree, design an algorithm which creates a linked list of all the nodes at each depth (i.e., if you have a tree with depth D, you’ll have D linked lists).
- .·´¯`·.´¯`·.¸¸.·´¯`·.¸><(((º> January 23, 2014| Report Duplicate | Flag | PURGE
Oracle Software Engineer / Developer Algorithm - 0of 0 votes
AnswersGiven a directed graph, design an algorithm to find out whether there is a route be-
- .·´¯`·.´¯`·.¸¸.·´¯`·.¸><(((º> January 21, 2014 in United States for Oracle
tween two nodes.
What is the complexity of the algorithm?| Report Duplicate | Flag | PURGE
Oracle Software Engineer / Developer Algorithm - 0of 0 votes
AnswersImplement entity tag cache in following two assignments. Design cache for
- gzagarwal January 08, 2014 in United States
read performance. Also, ensure that it takes as little memory as possible.
Write a caching class EntityTagCache that is supposed to cache tags for a given
id. Also provide TestEntityTagCache JUnit class that we can use to verify the
functionality. We only need above two files ( e.g. no need for build file ), as
we'll go through your solution in an Eclipse Java project.
An entity and its tags have following characteristics:
- A given entity is identified by an int id. The id is >= 0.
- An entity can have 0-N tags, where each tag is a string value. E.g. for
id '1', we can have tags like 'foo' & 'bar'. There are around 1000 unique
tags in 100 million entities, but the actual number can vary by a few thousand.
- The EntityTagCache does not need to consider id/tag eviction. It is expected
for the cache to throw a OutOfMemoryError if more tags exist than we can cache
in memory. However, the design should ensure that it takes as little memory
as possible to cache the tags.
- There can be maximum of 100 million entities in the cache and the id value
cannot be more than the number of entities in the cache and is >= 0. Thus,
if we've to cache 100 entities, then id is from 0 to 99.
- We should be able to load our initial data into the cache when we create
EntityTagCache. We should pass a file to the cache that contains entity
information. E.g.
entities.csv
------------
1,foo,bar
2,abc,foo
3
4,xyz,bar
In above, in first line entity id is 1 and tags are foo, and bar. For entity id 3
there are no tags.There are four unique tags 'foo', 'bar', 'abc', and 'xyz'.
EntityTagCache cannot be updated once it has all the data. Also, it
does not need to have any notion of eviction, as we require that all the
data must be loaded in memory. The cache only provides the following
public method:
1. 'getTags' method that takes an id and returns the tags for the entity.
This method on worst case ( barring garbage collection) take a few
100 nano seconds. It can be called 1000's of time in a few milliseconds.
The cache should be designed for multi threaded access with 1000's
of requests to getTags in a few ms.| Report Duplicate | Flag | PURGE
Oracle Java Developer - 0of 0 votes
AnswersSuppose you have all the info of all the restaurants on the world.
- .·´¯`·.´¯`·.¸¸.·´¯`·.¸><(((º> November 18, 2013 in United States
1) How would you store all the information ?
2) Get the top 10 recommendation near me. ( using your current position)
explain design and algorithm complexity analysis| Report Duplicate | Flag | PURGE
Oracle Software Engineer / Developer Algorithm - 1of 1 vote
AnswersImagine you have the information of all the people from the beginning of the world. How would you know who is the first common ancestor of 2 people.
- .·´¯`·.´¯`·.¸¸.·´¯`·.¸><(((º> November 18, 2013 in United States
Let say, You have a reference to yourself and I give you a reference to Albert Einstein, I want to know who is your common ancestor| Report Duplicate | Flag | PURGE
Oracle Software Engineer / Developer Algorithm - 0of 0 votes
AnswersHow would you return/get/print/know the longest Unique word from a text (book, newspaper, lot of data) efficiently ?
- .·´¯`·.´¯`·.¸¸.·´¯`·.¸><(((º> November 18, 2013 in Mexico for Oracle Data Miner
In other words, find the word that only occurs 1 time from a big text.| Report Duplicate | Flag | PURGE
Oracle Software Engineer / Developer Algorithm - 1of 1 vote
AnswersGiven a binary tree, an integer k and a node, you have to find all the nodes at distance k from the given node.
- rkthe1 October 19, 2013 in India| Report Duplicate | Flag | PURGE
Oracle Member Technical Staff Algorithm - 0of 0 votes
AnswersWrite a function to find a key in Hash map if the value associated to that key is given as input. As a followup, swap key & value assuming that value is not equal to any of the existing keys.
- jyothiprasadb May 21, 2013 in India| Report Duplicate | Flag | PURGE
Oracle Software Engineer in Test Java - 0of 0 votes
AnswersWrite a function to perform string replace without using any inbuilt functions.
- jyothiprasadb May 21, 2013 in India| Report Duplicate | Flag | PURGE
Oracle Software Engineer in Test Coding - 0of 0 votes
AnswersWhats the best way to synchronize Singleton class.
- Razz March 07, 2013 in India| Report Duplicate | Flag | PURGE
Oracle Software Engineer / Developer - 0of 0 votes
AnswersHow will you synchronize 3rd party library from your application..
- Razz March 07, 2013 in India| Report Duplicate | Flag | PURGE
Oracle Software Engineer / Developer Java - 0of 0 votes
Answerswhat are the disadvantage or problem in template instantiation?
- Alex September 16, 2012 in United States| Report Duplicate | Flag | PURGE
Oracle C++ - 1of 1 vote
AnswersWrite a C function to print all the elements less than the key element in binary search tree
- deepthirao345 August 29, 2012 in United States| Report Duplicate | Flag | PURGE
Oracle Software Engineer / Developer Data Structures - 0of 0 votes
AnswersYou have 8 coins. 3 of them weigh x units, 3 y units, 1 a units and 1 b units. They are all mixed and look identical. You have to find the lightest coin in minimum number of weighing .
- amnesiac July 31, 2012 in India| Report Duplicate | Flag | PURGE
Oracle Software Engineer / Developer Brain Teasers