You have 9 marbles. 8 marbles weigh 1 ounce each, & one marble weighs 1.5 ounces. You are unable to determine which is the heavier marble by looking at them. You have a weighing scale that consists of 2 pans, but the scale is only good for 2 total weighings. How can you determine which marble is the heaviest one using the scale & in 2 weighings?
5 26878The command "show IP protocol" displays which information? A. routing timers B. network information C. contents of the IP routing table D. information about all known network and subnetworks
4 21669What are the 2 functions of the Data Link Mac layer? * Handles access to shared media * Manages protocol access to the physical network medium * Provides SAPs for higher level protocols * Allows multiple devices to uniquely identify one another on the data link layer
8 19774Which is the largest tea producing country in the world? 1 Kenya 2 Indonesia 3 China 4 India
10 15822. The first muslim invader in India was (1) Changez Khan (2) Muhammad Ghori (3) Muhammad of Ghazni (4) Muhammad-bin-Qasim
57 78917how to calculate BEP in this problem? Sales Rs.3,00,000 Fixed Exp. Rs. 75,000 Direct Material.Rs.1,00,000 Direct Labour Rs.60,000 Direct exp. RSs.40,000
6 18345Y.T.E.M.A.H.R. is alphabets ko setting karke 1 romantic work banta hai isko wo bana sakta hai jisne true love kiya ho its challange for you
23 84036You have given 2 array. You need to find whether they will
create the same BST or not.
For example:
Array1:10 5 20 15 30
Array2:10 20 15 30 5
Result: True
Array1:10 5 20 15 30
Array2:10 15 20 30 5
Result: False
One Approach is Pretty Clear by creating BST O(nlogn) then
checking two tree for identical O(N) overall O(nlogn) ..we
need there exist O(N) Time & O(1) Space also without extra
space .Algorithm ??
DevoCoder
guest
Posted 3 months ago #
#define true 1
#define false 0
int check(int a1[],int a2[],int n1,int n2)
{
int i;
//n1 size of array a1[] and n2 size of a2[]
if(n1!=n2) return false;
//n1 and n2 must be same
for(i=0;i
Post New Facebook Interview Questions
Can excel pull data from access?
Can you explain equivalence partitioning?
Can any body tell gulf interview question for experienced electrical engineer ?
Is hashset ordered java?
How do I change all tabs with spaces in word?
Which sql most popular?
What is the direction of null vector?
How to construct new s4 class?
What are the different ways in which you can give support to customers to solve their queries?
Why mysql is used with php?
Explain different http methods supported by restful web services?
What are drawbacks of singleton class?
What is toolbars in ms word?
What system options would you use to help debug a macro? : sas-macro
What is similarity and difference between truncate and delete in sql?