Friday, December 31, 2010

What is MULTIORG in oracle apps?

Multiorg is nothing but under single oracle
application implementation maintaining multiple organizations and multiple set of books.
We will have Multiorg tables (table which is ending with _ALL). When ever we enter the
data, which will be stored in the Multiorg tables only.
Ex: OE_ORDER_HEADERS_ALL
OE_ORDER_LINES_ALL
PO_HEADERS_ALL
PO_LINES_ALL

What is the difference between org_id and organization_id?

ORG_ID will come under operating unit in Multiorg. ORGANIZATION_ID will come under inventory organization.
ORG_ID is used to distinguish the data of different business organizations.
ORGANIZATION_ID is used to identify the items belongs to which inventory organization
it has assigned.

What is the API to set the org_id value?

"FND_CLIENT_INFO.SET_ORG_CONTEXT" is the API used to set the ORG_ID
value from the backend, so that system will retrieve the data from the database which is
related to mention the organization.
Syntax: Begin
FND_CLIENT_INFO.SET_ORG_CONTEXT(ORG_ID);
end;
EX: Begin
FND_CLIENT_INFO.SET_ORG_CONTEXT(128);
end;

What are types of docs in Oracle Apps?

1. MD 050 -- Module design by the functional consultant.
2. MD 070 -- Technical Document designed by the technical consultant.
3. MD 020 -- Technical document designed by the functional document.
4. MD 0120 -- Migration and user training document by the technical consultant.
5. CV 040 -- Conversion of the functional document by the functional consultant.
6. CV 060 -- Conversion of the technical document by the technical consultant.

Given numbers 1-n where one of the numbers is repeated. find the repeated number[amazon]

Suppose given numbers are 12235

For each number go to that index and make the number negative like

for 1 a[1] = -1

2 a[2] = -2

Next time when you do check a[2] already the number is negative it means that number is repeated

And the index of the number which is not negated is missing number

How do you know whether a tree is binary search tree or not? [ Microsft]

If you do in order traversal of the tree it should be sorted if it is a binary search tree

[Microsoft]

rearrange an array of integers such that on one side you have all even numbers and the other side you have all odd numbers.
now among the even numbers, they should be sorted and among the odd numbers they should be sorted

Thursday, December 30, 2010

How do you find the longest palindrome in a given string [Microsoft]

Why cant we approve purchase order even if hierarchy and approver also set?

We need to run "Run fill employee hierarchy" concurrent program

What are status of RFQ?

Active, close, Inprocess.

when the purchase requisition status will go under In-process status?

The document type is not properly routed with approval group & approval limits.

[Google]

1. A
2. Ctrl+A
3. Ctrl+C
4. Ctrl+V
If you can only press the keyboard for N times (with the above four keys), please write a program to produce maximum numbers of A. If possible, please also print out the sequence of keys.
So the input parameter is N (No. of keys that you can press), the output is M (No. of As that you can produce

Given an array of integers, print all possible continuous sub arrays of maximum length that follow same trend (Ascending/Descending)

Given a single linked list with character data, find whether the given linked list is a palindrome.

What is the Time Complexity to remove the minimum element from a Min-Priority-Heap containing N elements?

An array is instantiated with the new [] operator. Is it sufficient to delete the array using a delete operator?

Write the code the reverse the linked list.

A boy goes to school at a speed of 3 km/hr and returns to the village at a speed of 2 km/hr. If he takes 5 hrs in all, what is the distance between the village and the school?

Interview Question

A pipe can fill a tank in 12 minutes and another pipe in 15 minutes, but a third pipe can empty it in 6 minutes. The first two pipes are kept open for 5 minutes in the beginning and then the third pipe is also opened. In what time is the cistern emptied?


a. 30 minutes
b. 35 minutes
c. 40 minutes
d. 45 minutes

8 Children and 12 men complete a work in 9 days. Each child takes twice the time taken by a man. In how many days will 12 men finish the same work?

a. 10 days
b. 11 days
c. 12 days
d. 13 days

A and B can do a piece of work in 12 days, B and C in 15 days, C and A in 20 days. How long would each take separately to do the same work?

A dishonest dealer professes to sell his goods at cost price, but he uses a weight of 950 gm for the 1 kg weight. Find his gain per cent.

Each of the two horses is sold for Rs 720. The first one is sold at 25% profit and the other one at 25% loss. What is the % loss or gain in this deal?

The salary of a worker was first increased by 10% and thereafter, decreased by 5%. What was the change in the salary?

A and B invested in the ratio 3:2 in a business. If 5% of the total profit goes to charity and A’s share is Rs 855, find the total profit.

Interview Question

In a box carrying one dozen of oranges, one-third has become bad. If 3 oranges are taken out from the box at random, what is the probability that at least one orange out of the three oranges picked up is good?

How many different 2-member teams can be selected for playing tennis out of 4 ladies and 3 gentlemen there being one lady and one gentleman on each team?

a. 70
b. 74
c. 72
d. 73

Wednesday, December 29, 2010

Horses Problem: Find the minimum number of races to find the top 3 horses given 25 horses and 5 horses can race in a race?

divide into 5 groups : find the top 5 horses in each group-> 5 races
race the five horses of the 5 groups->1 race(This results in 6 horses left for 3 positions)
final race (Total = 5+1+1 races)

Classic – Egg Problem

You are given 2 eggs.You have access to a 100-storey building.


Eggs can be very hard or very fragile means it may break if dropped from the first floor or may not even break if dropped from 100 th floor.Both eggs are identical.You need to figure out the highest floor of a 100-storey building an egg can be dropped without breaking.


Now the question is how many drops you need to make. You are allowed to break 2 eggs in the process.

Tuesday, December 28, 2010

Find the minimum element in binary search tree

Given a non-empty binary search tree (an ordered binary tree), return the minimum data value found in that tree. Note that it is not necessary to search the entire tree. A maxValue() function is structurally very similar to this function. This can be solved with recursion or with a simple while loop.

Monday, December 27, 2010

check whether two binary trees are identical

Given two binary trees, return true if they are structurally identical -- they are made of nodes with the same values arranged in the same way.

create a double tree for given binary tree

For each node in a binary search tree, create a new duplicate node, and insert the duplicate as the left child of the original node. The resulting tree should still be a binary search tree.

Print the mirror of the binary tree

Print paths of the binary tree

Given a binary tree, print out all of its root-to-leaf paths as defined above. This problem is a little harder than it looks, since the "path so far" needs to be communicated between the recursive calls.

Find maximum depth of the tree

Given a binary tree, compute its "maxDepth" -- the number of nodes along the longest path from the root node down to the farthest leaf node. The maxDepth of the empty tree is 0, the maxDepth of the tree on the first page is 3.

Given a binary tree, count the number of nodes in the tree.

Find the number of nodes in the tree

Find depth or height of tree

tree_height(mynode *p)
{
   if(p==NULL)return(0);
   if(p->left){h1=tree_height(p->left);}
   if(p=>right){h2=tree_height(p->right);}
   return(max(h1,h2)+1);

Sunday, December 26, 2010

Procure to Pay cycle

The procure to pay cycle covers following steps

1. Creating Requisition
2. Creating Purchase Order
3. Creating Receipt
4. Creating Invoice in AP
5. Paying the Invoice
6. Transfer, Import and Post to GL

Given a string S of words and no of character per line m ,with m being greater than the longest word in S,print S in a set of lines so that each line contains no more than m characters and no word split between 2 lines.

Given a binary tree build a linked list of all its nodes such that the nodes of a level appear before the nodes of the next level?

Given an infinite stream of bits with the bits being appended at the highest significant position. give an algorithm to to say whether the number formed by using the sequence of bits that had been processed till then, is divisible by 3 or not?

There are 2 sorted arrays A and B of size n each. Write an algorithm to find the median of the array obtained after merging the above 2 arrays(i.e. array of length 2n). Full points are given for the solution bearing efficiency O(log n). Partial points for the efficiency O(n).

There is a temple, whose premises have a garden and a pond. It has 4 idols, each of Ram, Shiv, Vishnu and Durga. The priest plucks x flowers from the garden and places them in the pond. The number of flowers doubles up, and he picks y flowers out of them and goes to offer it to Lord Ram. By the time he reaches to the pond, he finds the remaining flowers also have doubled up in the meantime, so he again picks up y from the pond and goes to Lord Shiv.This process is repeated till all the Gods have y flowers offered to them, such that in the end no flower is left in the pond. Find x and y.

I have an array consisting of 2n+1 elements. n elements in it are married, i.e they occur twice in the array, however there is one element which only appears once in the array. I need to find that number in a single pass using constant memory. {assume all are positive numbers}

I have a file in which there are supposed to be 4 billion numbers, starting from 1 to 4,000,000,000 but unfortunately one number is missing,i.e there are only 3,999,999,999 numbers, I need to find the missing number. In this question he asked me concepts like fopen, what will be the size of such a file and how such a big file will get loaded into RAM,and also concepts of logical/virtual/physical memory and memory paging.

If the Fibonacci series is 1,2,3,5,8,13,..... then 10 can be written as 8 + 2 ==> 10010 and 17 can be written as 13 + 3 + 1 ==> 100101. Got it??

Types of Invoices in Oracle Apps

1) Standard – For all the normal payments we will crate this.
2) Prepayment - Advance Payment to the supplier based on the requirement.
3) Credit Memo - If supplier give the discount - for negative amount
4) Debit Memo - If company is going to deduct the amount - for negative amount
5) With holding tax – if supplier is not recognized, the on be half of the supplier company
will pay the tax.
6) PO Default - We will give the PO number according to that it will generate the
Invoices.
7) Recurring Invoices – WE will generate the Invoices multiple times for fixed supplier, fixed
amount, fixed duration.
8) Expense Report – Employee expenses
9) Quick Match – 2 Way, 3 Way, 4 Way
10) Mixed Invoice – Miscellaneous expenses

Write a C program generate permutations.

Write a C program to reverse a string

Write a C program to reverse the words in a sentence in place.

What is the difference between the memmove() and memcpy() function?

How can I search for data in a linked list?

How to read a singly linked list backwards?

How would you find out if one of the pointers in a linked list is corrupted or not?

Can we do a Binary search on a linked list?

How to create a copy of a linked list?

How to compare two linked lists?

If you are using C language to implement the heterogeneous linked list, what pointer type will you use?

How do you find the middle of a linked list?

How would you detect a loop in a linked list?

How do you reverse a linked list without using any C pointers?

Write a C program to implement a Generic Linked List

How to declare a structure of a linked list?

How do you sort a linked list?

Given only a pointer to a node to be deleted in a singly linked list, how do you delete it?

How do you reverse a singly linked list? How do you reverse a doubly linked list?

Implement a deck of cards using OOPs

Write a program which print all possible combination of 10 A and 10 ‘B’

Find loop in a single list. proof the correctness of your algorithm. if fast pointer incremented by 3 and slow pointer incremented by 2 would it work? proof the correctness of second strategy? which one is more efficient and why?

sizeof(void)?

perform divide operation without using "/" ... give the most optimized solution

How to implement inheritance in C? How to implement Virtual functions in C?

given a set of distinct integers {a1, a2, a3, a4, a5, ...} and a set of exclusion rules: R = {{a1, a3}, {a2, a4, a10}, ...} can you print out all the valid subsets?

write a program which find LCA of a binary tree. It is not a BST(citrix)

when we type in google for seach it will genate search text. for a stream of searchtext how you will find most 10 frequent search test. give a efficient data structure for this. and also solve it with possible minimum complexity

what is SACK? what is the use of SACK?

what is fast retransmit? explain with example?

Find two elements in an array whose sum is closest to zero?