why not (...((9!^9!)!)!)! or so? there should be some limit on number of
operators
On Fri, May 6, 2011 at 6:32 PM, Rohit J. email.rohit.n...@gmail.com wrote:
I think
(9!^9!)! is the correct answer.
1/0 is not because to be precise it's not defined.
Lim(x -0) 1/x is infinity. :)
Cheers
Please consider this method...
with respect to first point sort (in place) other n-1 ponits comparing the
angles (between the horizontal line passing through 1st point and the line
passing through 1st point and current point)... (nlogn) (merge sort may be
used)
checke for 3 collinear points
2.
keep a counter n
take the first element of the array say e and initialize the counter n=1
for each remaining number in the array
if n==0, e=current element, n=1
if current element is equal to e, n++
else n--
if n==0 there is no number
otherwise check the number of occurrences of e in the array
I did not get the point:-we mustcalculate widthand height ofallof rectangles that can coverthis 4 rectangles and it'sareabecome minimumcan you give some example?
On 11/7/06, mohamad momenian [EMAIL PROTECTED] wrote:
No they can't over lap
thank you for your attention
On 11/7/06, shisheng li
test per your algorithm the root of the original
chain continues to be the root of the final result, which is not true.
i did not get your point. can you please clarify it with a suitable example??
On 3/18/06, Malay Bag [EMAIL PROTECTED] wrote:
thts not true
first of all n is height of the new
@rajiv...
everything is right. but i think there is small problem. in order to
get the middle point of the chain you will need to traverse half of
the chain. this will take linear time. so effectively it becomes
T(N) = 2T(N/2) + O(N) which results T(N) = O(NlogN)
plz check whether i am right
it
i have really enjoyed this problem. thanx Gene for such good problem
On 3/19/06, Malay Bag [EMAIL PROTECTED] wrote: @rajiv.. can you plz write the code or pseducode? i am not clear yet.. thanx in advance
On 3/19/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: No, I guess you've misunderstood
node *root;
node * build(int height)
{
node *r, *temp;
for(i=1, r=null; i=height root; i++)
{
temp = root;
root=root-left;
temp-right=r;
r=temp;
r-left = build(i-1);
}
return r;
}
void main()
{
node *tree;
//root contains original tree
tree = buld(n); // n=height of of new tree
}
i will
calculating total no of nodes is too easy... a single traverse through
the tree will suffice... this will take linear time and hence will not
increase runtime complexity
On 3/14/06, BiGYaN [EMAIL PROTECTED] wrote:
If we can have the total no. of nodes in tree as an input (say N), this
see my solution it will take logN space and O(N) time
On 3/15/06, pramod [EMAIL PROTECTED] wrote:
But this will require O(N) space anyway. The problem asks for O(log(n))
space.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
node *root;
node * build(int height)
{
node *r, *temp;
for(i=1, r=null; i=height root; i++)
{
temp = root;
root=root-left;
temp-right=r;
r=temp;
r-left = build(i-1);
}
return r;
}
void main()
{
node *tree;
tree = buld(n); // n=height of of new tree
}
i think this will take O(N) time and logN
roflol
On 3/1/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
HOW YOU ARE GOING TO MAKE A $6
INVESTMENT INTO $6000 IN 2 WEEKS ONLINE. ONLINE.
A little while back, I was browsing through newsgroups, just like you
are now,
and came across an article similar to this that said you could make
//N=no of digit of n;
//ar[0]=10; for i=1,N a[i]=ith digit of n from left
i=N-1;
while(ar[i]ar[i+1])i--;
if(i==0)return ;//i.e no answer
j = N;
while(ar[i]ar[j])j--;
swap( ar[i],ar[j]);
i think this link will answer ur query
http://www-cse.uta.edu/~holder/courses/cse2320/lectures/l15/node12.html
On 2/21/06, shooshweet [EMAIL PROTECTED] wrote:
n objects x1...xn, each having weight wi and profit pi, are to be
placed into a sack with capacity M. Can somebody please help me
14 matches
Mail list logo