Re: [algogeeks] Intuitive Understanding of XOR Operation

2011-06-13 Thread radha krishnan
Another use of XOR is to generate some random numbers And XOR is extensively used in the field of CryptoGraphy !!! -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe

Re: [algogeeks] a doubt..

2011-06-13 Thread Arpit Sood
Navneet can you point to some resources ? Iterative procedures are generally faster than recursion unless it is not required to fill the table completely. On Tue, Jun 14, 2011 at 11:39 AM, Navneet Gupta wrote: > Not really, time to push and pop functions from stack is not included in > algorithm

Re: [algogeeks] Intuitive Understanding of XOR Operation

2011-06-13 Thread snehi jain
hi, the way XOR operation works i.e 0 for duplicates is used the most. A practical application that i know is , XOR is used for Forward Error correction for packet loss over a network. It works on the same principle like the duplicate problem. Another application that i know is for Error detectio

Re: [algogeeks] a doubt..

2011-06-13 Thread Navneet Gupta
Not really, time to push and pop functions from stack is not included in algorithm analysis because it would ultimately be compiler/machine dependent Also running time of algorithms is very much a theoritical concept which works for most practical purposes. On Tue, Jun 14, 2011 at 11:31 AM, snehi

[algogeeks] solve

2011-06-13 Thread amit
http://www.freepuzzles.com/puzzles/PuzzlePage.asp?PuzzleNumber=Geom003&CategoryID=1 -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to

Re: [algogeeks] a doubt..

2011-06-13 Thread snehi jain
wont recursion will also be resource (time) intensive because of the multiple function call which is not observed in iterative procedures. On Tue, Jun 14, 2011 at 7:30 AM, Navneet Gupta wrote: > Recursion is the best way to write compact programs for what might > seem as tedious tasks to do. > >

Re: [algogeeks] Swapping two variables without using a temporary variable

2011-06-13 Thread sunny agrawal
@tech rascal 10 = 01010 20 = 10100 -- xor = 0 = 30 why r u getting 1 ?? On Tue, Jun 14, 2011 at 2:28 AM, Supraja Jayakumar wrote: > @Wladimir: > Can you kindly explain the overflow and underflow you mentioned. > > Thanks > Supraja J > > On Fri, Jun 10, 2011 at 9:58 PM, Wladi

[algogeeks] Intuitive Understanding of XOR Operation

2011-06-13 Thread Navneet Gupta
Hello, I would really appreciate if someone can help me get an intuitive understanding of XOR over a range of numbers. I have seen it's usage is a couple of problems where duplicates are involved and though ultimately i can see how it is solving the problem, i still feel like checking the correct

Re: [algogeeks] a doubt..

2011-06-13 Thread Navneet Gupta
Recursion is the best way to write compact programs for what might seem as tedious tasks to do. Dynamic Programming is an alternate to recursion when problems possess characteristics like suboptimal substructures and overlapping subproblems. Dynamic Programming is a iterative way of doing tasks w

Re: [algogeeks] Swapping two variables without using a temporary variable

2011-06-13 Thread Supraja Jayakumar
@Wladimir: Can you kindly explain the overflow and underflow you mentioned. Thanks Supraja J On Fri, Jun 10, 2011 at 9:58 PM, Wladimir Tavares wrote: > Swapping two variables without using a temporary variable using the + and > -: > > x = a; > y = b; > > x = x + y / / x = a + b; > y = x - y / /

Re: [algogeeks] a doubt..

2011-06-13 Thread Supraja Jayakumar
Is it right to say iteration is resource(time) intensive and recursion is not. On the other hand, recursion is space intensive (with stacks) and iteration is not ? Thanks On Mon, Jun 13, 2011 at 2:08 PM, ADITYA KUMAR wrote: > its always better to have iterative program than recursive > since it

Re: [algogeeks] Re: Swapping two variables without using a temporary variable

2011-06-13 Thread Felipe Ferreri Tonello
On 06/13/2011 05:22 PM, tech rascal wrote: just a small doubt. if x=10 and y=20 thn wht wud b the value of (x ^ y)? acc to meit has to be 1 bt if the value is 1 , thn how wud the method using XOR operations work?.plz xplain On Mon, Jun 13, 2011 at 3:18 AM, KK

Re: [algogeeks] Re: Swapping two variables without using a temporary variable

2011-06-13 Thread tech rascal
just a small doubt. if x=10 and y=20 thn wht wud b the value of (x ^ y)? acc to meit has to be 1 bt if the value is 1 , thn how wud the method using XOR operations work?.plz xplain On Mon, Jun 13, 2011 at 3:18 AM, KK wrote: > @kunal > Actually its not same value its the same variab

Re: [algogeeks] a doubt..

2011-06-13 Thread ADITYA KUMAR
its always better to have iterative program than recursive since iterative program doesn't rely on system stack.. but recursive program are easy to write and gives a clear view of program On Tue, Jun 14, 2011 at 1:13 AM, snehi jain wrote: > hi, > we try to implement many programs using Recursion

[algogeeks] a doubt..

2011-06-13 Thread snehi jain
hi, we try to implement many programs using Recursion and its said that this is better than iterative procedure. if i am right then i cant understand why is it so? can anybody explain ... and are there situations when iterative procedure is better than recursion. Snehi -- You received this me

[algogeeks] A good one if you are not aware of... ( why % operator is costly)

2011-06-13 Thread HowTechStuffWorks
http://geeksforgeeks.org/?p=9057 -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more

Re: [algogeeks] Re: Java Book

2011-06-13 Thread snehi jain
sams teach yourself JAVA in 21 days is a book that gives idea about every topic and then you can study in detail. On Mon, Jun 13, 2011 at 11:16 PM, vaibhav shukla wrote: > @monty 1987 : can u plss send me the book u'r talking of .Thank you!! > > > On Mon, Jun 13, 2011 at 10:31 PM, Puneet Ginori

Re: [algogeeks] [brain teaser ] Probability Riddle Loaded Revolver 13 june

2011-06-13 Thread Arpit Sood
+1 to Kunal's post i think if you rotate again prob. of getting shot is 1/3 and not 1/2 On Mon, Jun 13, 2011 at 11:56 PM, sunny agrawal wrote: > @Douglas > i don't understand your probablity analysis > but still for Rotate again as in your analysis 2/6+1/6 = 1/2 > pull the triiger again is still

Re: [algogeeks] help

2011-06-13 Thread udit sharma
hmm. Sry yr... Got it.. Thanx.. :) :) -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For

Re: [algogeeks] help

2011-06-13 Thread sunny agrawal
k is zero in 2nd code, m is 1 On Tue, Jun 14, 2011 at 12:03 AM, udit sharma wrote: > @Sunny: Thn y k=1 in 2nd code??? > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. >

Re: [algogeeks] help

2011-06-13 Thread udit sharma
@Sunny: Thn y k=1 in 2nd code??? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more

Re: [algogeeks] [brain teaser ] Probability Riddle Loaded Revolver 13 june

2011-06-13 Thread sunny agrawal
@Douglas i don't understand your probablity analysis but still for Rotate again as in your analysis 2/6+1/6 = 1/2 pull the triiger again is still better although my thinking was same as kunal explained On Mon, Jun 13, 2011 at 11:20 PM, Douglas Diniz wrote: > Six-chambered revolver, so 2 bullets

Re: [algogeeks] help

2011-06-13 Thread sunny agrawal
m= ++i || ++j && ++k; ++i will evauate to 3 and which is true so as next is || so next part will not be evaluated and m = true On Mon, Jun 13, 2011 at 11:34 PM, udit sharma wrote: > Bt y k=0, in 2nd code??? > > -- > You received this message because you are subscribed to the Google Groups > "Al

Re: [algogeeks] help

2011-06-13 Thread udit sharma
Bt y k=0, in 2nd code??? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options,

Re: [algogeeks] Re: Print 1 to n without loops

2011-06-13 Thread Kunal Patil
@Divye Kapoor : It was interesting...use of inheritance concept to print that... On Mon, Jun 13, 2011 at 12:09 AM, Divye Kapoor wrote: > This will probably be the best solution yet ;) > > Compile time template metaprogramming: > > template > class X : public X { > public: > X() { cout << N << en

Re: [algogeeks] [brain teaser ] Probability Riddle Loaded Revolver 13 june

2011-06-13 Thread Douglas Diniz
Six-chambered revolver, so 2 bullets in sequence is the same as 1 bullet in Five-chambered. So, pull the trigger again = 1/5 + 1/5 = 2/5 (to die) Rotate again = 2/6 + 1/6 = 1/3 (to die) So, is better to rotate again On Mon, Jun 13, 2011 at 2:35 PM, Kunal Patil wrote: > Assuming everything is un

Re: [algogeeks] Re: Java Book

2011-06-13 Thread vaibhav shukla
@monty 1987 : can u plss send me the book u'r talking of .Thank you!! On Mon, Jun 13, 2011 at 10:31 PM, Puneet Ginoria wrote: > Java in 60 Minutes A Day.. > by Rich Raposa.. > > its a good book for begginers... > > -- > You received this message because you are subscribed to the Google Groups > "

Re: [algogeeks] [brain teaser ] Probability Riddle Loaded Revolver 13 june

2011-06-13 Thread Kunal Patil
Assuming everything is unbiased: probability of the next slot to contain a bullet (given, first was empty) would be (1/4) = 0.25 After spinning: prob(bullet) = (2/6) = 0.334... We want to minimize the probability... thus answer should be just to pull the trigger again.. On Mon, Jun 13, 2011 at 1

Re: [algogeeks] Re: Java Book

2011-06-13 Thread Puneet Ginoria
Java in 60 Minutes A Day.. by Rich Raposa.. its a good book for begginers... -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algo

Re: [algogeeks] help

2011-06-13 Thread sunny agrawal
because in all expression is evaluated to true. On Mon, Jun 13, 2011 at 10:02 PM, sahil sharma wrote: > ok i got the values of i ,j ,k ,.in all the 3 codes but can u > please explain me how we get the value of m =1 in all the 3 > program.? > > -- > You received this message b

Re: [algogeeks] help

2011-06-13 Thread sahil sharma
ok i got the values of i ,j ,k ,.in all the 3 codes but can u please explain me how we get the value of m =1 in all the 3 program.? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algog

Re: [algogeeks] Re: Java Book

2011-06-13 Thread monty 1987
The best book is effective java ...but it is not for beginners but SCJP java book is marvellous !!! On Mon, Jun 13, 2011 at 5:59 AM, naivenow wrote: > The Complete Reference By Herbert Shildt is comprehensive. > You can also look up some tutorials on youtube :) > > On Jun 13, 11:05 am, Anura

Re: [algogeeks] Re: MS Interview

2011-06-13 Thread Ashish Goel
suppose numbers are 11,12,13,15 then you get some xor_val for xor of all these numbers after this for (int i=11;i<=15;i++) xor_val ^=i; now xor_val is 14 Best Regards Ashish Goel "Think positive and find fuel in failure" +919985813081 +919966006652 On Sun, Jun 12, 2011 at 9:24 PM, Supraja Ja

Re: [algogeeks] MS Interview

2011-06-13 Thread 李峰
A1.bitmap. A2.xor. On Thu, Jun 09, 2011 at 02:45:48AM -0700, Dumanshu wrote: > Q1. 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 t

Re: [algogeeks] Re: MS Question

2011-06-13 Thread sunny agrawal
no we can take care of duplicates without any extra memory modify 2nd step of my previous solution as follows if T[a[i]] is set then this element is there in second array so report this element and Reset T[a[i]]. now no duplicates will be reported. and only 1025 bits will be required. any failure

Re: [algogeeks] help

2011-06-13 Thread prateek gupta
the expression involving and and or operator is evaluated from left to right uptill the point from where the value of the expression can be determined. On Mon, Jun 13, 2011 at 6:17 PM, Shachindra A C wrote: > || and && operators are called short circuit operators and need not > necessarily evalua

Re: [algogeeks] Re: MS Question

2011-06-13 Thread Arpit Sood
we can take care of the duplicate entries, but then that would cost more space(int), as of now we are working with bool On Mon, Jun 13, 2011 at 5:51 PM, sunny agrawal wrote: > that will report duplicate entries multiple times :( > > > On Mon, Jun 13, 2011 at 5:38 PM, sunny agrawal wrote: > >> why

[algogeeks] Re: Mathematical Induction

2011-06-13 Thread HowTechStuffWorks
That was an exact answer I was looking for. I thought along those lines, But not sure whether its right Thanks On Jun 13, 5:44 am, ross wrote: > @howtechstuffworks: > > Your question seems to be - why 'k+1' and not 'k+2' or 'k+3' or > something else. > The simple reason is that, > > Given

[algogeeks] How better way to make a controller class ?

2011-06-13 Thread Luciano Junior
Your boss asks you to do a program that maintains the database of customers updated. You need to dotNet using MVC. For you, what may be the best way to create a control class to access and update data from customers? Luciano Pinheiro. -- You received this message because you are subscribed to t

[algogeeks] Re: Java Book

2011-06-13 Thread naivenow
The Complete Reference By Herbert Shildt is comprehensive. You can also look up some tutorials on youtube :) On Jun 13, 11:05 am, Anurag Gupta wrote: > Please suggest any good book for Java (for beginners) > Thanks in advance :) -- You received this message because you are subscribed to the Goo

Re: [algogeeks] help

2011-06-13 Thread Shachindra A C
|| and && operators are called short circuit operators and need not necessarily evaluate the entire expression. In ex 1, m= ++i && ++j || ++k; here, ++i and ++j are done. then the result is orred with ++k; here, irrespective of the value of the right side(++k), the result would always be 1. Hence,

Re: [algogeeks] Re: Topcoder Escape problem

2011-06-13 Thread Gaurav Saxena
Ok bfs cannot be used in this. I thought that as the graph is un weighted I could use bfs. Thanks for your advice. Thanks for that idea. Actually for dijkstra I need to have a node list. Could you tell me what should I consider as node. I think I should take node as each (x,y) pair ? On Mon, Jun

[algogeeks] help

2011-06-13 Thread sahil
can sme body tell me..? 1) #include int main() { int i= -3, j=2 ,k=0, m; m= ++i && ++j || ++k; printf("%d %d %d %d\n",i,j,k,m); return 0; } output: -2 3 0 1 2)#include int main() { int i= -3, j=2 ,k=0, m; m= ++i || ++j && ++k; printf("%d %d %d %d\n",i,j,k,m); return 0; } output: -2

Re: [algogeeks] Re: Cloud Project

2011-06-13 Thread karan sachan
Friends..read more about *"SaaS"* aka Software as a Service...where you can host your software on cloud as a service.It's better to start making a small SaaS app...hosting is a cake walk!! On Mon, Jun 13, 2011 at 5:29 PM, Divye Kapoor wrote: > It means that he's supporting your motion. > > -- >

Re: [algogeeks] Re: MS Question

2011-06-13 Thread sunny agrawal
that will report duplicate entries multiple times :( On Mon, Jun 13, 2011 at 5:38 PM, sunny agrawal wrote: > why do we need 2 bits at all ?? > i think single bit per table entry will do. > say table is T[1025], and array is A[M] > > > 1. Go through the N sized array and set bit 0 of the hash tabl

[algogeeks] Re: hw can argv be incremented

2011-06-13 Thread Divye Kapoor
Type of blah is: (non-const) pointer to an array of size 10 containing integer pointers. Type of F is: constant pointer to an array of size 10 of integer pointers. (the pointer is const as required by the standard). F can't be incremented as the name is bound to the base address in a constant m

Re: [algogeeks] Re: MS Question

2011-06-13 Thread sunny agrawal
why do we need 2 bits at all ?? i think single bit per table entry will do. say table is T[1025], and array is A[M] 1. Go through the N sized array and set bit 0 of the hash table entry to 1 if it is present in the first array. 2. Go through the M sized array and if T[a[i]] is set then this elemen

[algogeeks] Re: Cloud Project

2011-06-13 Thread Divye Kapoor
It means that he's supporting your motion. -- DK Follow me on Twitter: http://twitter.com/divyekapoor -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/LrxM

[algogeeks] Re: MS Question

2011-06-13 Thread Divye Kapoor
Use a hash table of size 1025 with bits per table entry = 2. 1. Go through the N sized array and set bit 0 of the hash table entry to 1 if it is present in the first array. 2. Go through the M sized array and set bit 1 of the hash table entry to 1 if the element belongs to 0 to 1024. 3. Go throug

[algogeeks] MS Question

2011-06-13 Thread Supraja Jayakumar
Question: An array is of size N with integers between 0 and 1024(repetitions allowed). Another array of integers is of size M with no constraints on the numbers. Find which elements of first array are present in the second array. (If you are using extra memory, think of minimizing that still, usin

[algogeeks] Re: Topcoder Escape problem

2011-06-13 Thread Divye Kapoor
You could also use a priority queue based search (A*) where you explore all vertices with cost 0 before exploring all vertices with cost 1 etc. Essentially, that is the same as Dijkstra's in this case. -- DK -- You received this message because you are subscribed to the Google Groups "Algorit

[algogeeks] Re: Topcoder Escape problem

2011-06-13 Thread Divye Kapoor
This is a standard shortest path problem. Use Dijkstras. Make a graph with edge costs based on the square's nature - Harmful or Deadly. Mark edge costs for Deadly as infinity. Find the cost of the shortest path. You can also use Bellman Ford algorithm which would be simpler to implement in this

[algogeeks] Re: Cloud Project

2011-06-13 Thread Supraja
Hi Sorry. What does that mean ? Thanks Supraja J On Jun 13, 12:45 am, Akash Mukherjee wrote: > +1 > > On Mon, Jun 13, 2011 at 4:47 AM, Supraja Jayakumar > > > > > > > > wrote: > > Hi All > > > Can someone suggest a simple application that I can develop and host on > > Azure. > > I have very li

[algogeeks] Topcoder Escape problem

2011-06-13 Thread Gaurav Saxena
Please suggest me a way to solve this problem http://www.topcoder.com/stat?c=problem_statement&pm=1170&rd=4371 Problem statement pasted below You are playing a video game that involves escaping from a dangerous area. Within the area there are DEADLY regions you can't enter, HARMFUL regions th

[algogeeks] hw can argv be incremented

2011-06-13 Thread himanshu kansal
char *a[10]; a++;//lvalue reqd error.. i knw dt base address f array cnt be incremented. bt following code compiles succesfully int main(int argc, char *argv[]) { printf("%s", *++argv); } can some one xplain why this is happening similarly int foo(int *blah[10]) { int *f[10]

Re: [algogeeks] Java Book

2011-06-13 Thread vaibhav shukla
for basics go for Complete Reference.then you can switch to BIG JAVA by Cay Horstman On Mon, Jun 13, 2011 at 4:58 AM, karan sachan wrote: > You can go for "Thinking in Java" by Bruce Eckel or books authored > by Hortsman...both are equally good!! > > > On Mon, Jun 13, 2011 at 11:35 AM, Anurag G

Re: [algogeeks] find error

2011-06-13 Thread kartik sachan
amit it is working fine in gcc complier and giving out too i.e 10 what's error in it?? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this grou

Re: [algogeeks] Re: How to remove duplicate element from array in one pass.

2011-06-13 Thread sunny agrawal
@ross thanks for clarification... On Mon, Jun 13, 2011 at 2:46 PM, ross wrote: > @sunny agarwal: > Yes, it would be considered constant space.. even if it required 1MB > of space . > By big oh notation of space, we mean cases where input size, 'n' tends > to infinity and > the space requirem

[algogeeks] Re: Mathematical Induction

2011-06-13 Thread ross
@howtechstuffworks: Your question seems to be - why 'k+1' and not 'k+2' or 'k+3' or something else. The simple reason is that, Given that P('k') and P('k+1') is true, we can extend it for ANY value of k. (ie) k+2 , can be derived from 'k+1' by substituting k=k+1. similarly k+3 can be derive

Re: [algogeeks] Sunset sum

2011-06-13 Thread kartik sachan
u think first sort the array then find the sum of +ve no and check with sum K if it is less then continueelse if equal then break and if more start subtracting from negative no present in arrayin all the process record the elements whom u are adding or subtracti

[algogeeks] Sunset sum

2011-06-13 Thread aanchal goyal
How to solve the subset sum problem if the array contains -ive elements also?? For example, given an array containing +,ve and -ive elements, and a sum K, how can we find whether a subset sums upto K in array? -- Regards,* Aanchal Goyal*. -- You received this message because you are subscribed t

[algogeeks] Re: How to remove duplicate element from array in one pass.

2011-06-13 Thread ross
@sunny agarwal: Yes, it would be considered constant space.. even if it required 1MB of space . By big oh notation of space, we mean cases where input size, 'n' tends to infinity and the space requirement of the algorithm proposed does not approach infinity. here, even if n->infinity, input size w

Re: [algogeeks] Java Book

2011-06-13 Thread karan sachan
You can go for "Thinking in Java" by Bruce Eckel or books authored by Hortsman...both are equally good!! On Mon, Jun 13, 2011 at 11:35 AM, Anurag Gupta wrote: > Please suggest any good book for Java (for beginners) > Thanks in advance :) > > -- > You received this message because you are subscrib

Re: [algogeeks] [brain teaser ] Probability Riddle Loaded Revolver 13 june

2011-06-13 Thread Piyush Sinha
ignore the above answerit shouldn't rotate again... On Mon, Jun 13, 2011 at 1:37 PM, Piyush Sinha wrote: > > should rotate again.. > > > On Mon, Jun 13, 2011 at 1:12 PM, sunny agrawal wrote: > >> Pull the Trigger Again ?? >> >> >> On Mon, Jun 13, 2011 at 1:01 PM, Lavesh Rawat wrote: >> >>> >>

Re: [algogeeks] [brain teaser ] Probability Riddle Loaded Revolver 13 june

2011-06-13 Thread Piyush Sinha
should rotate again.. On Mon, Jun 13, 2011 at 1:12 PM, sunny agrawal wrote: > Pull the Trigger Again ?? > > > On Mon, Jun 13, 2011 at 1:01 PM, Lavesh Rawat wrote: > >> >> *Probability Riddle Loaded Revolver - 13* June >> * >> * >> ** >> *Henry has been caught stealing cattle, and is brou

Re: [algogeeks] [brain teaser ] Probability Riddle Loaded Revolver 13 june

2011-06-13 Thread sunny agrawal
Pull the Trigger Again ?? On Mon, Jun 13, 2011 at 1:01 PM, Lavesh Rawat wrote: > > *Probability Riddle Loaded Revolver - 13* June > * > * * *** > ** > *Henry has been caught stealing cattle, and is brought into town for > justice. The judge is his ex-wife Gretchen, who wants to show him some > s

Re: [algogeeks] How to remove duplicate element from array in one pass.

2011-06-13 Thread sunny agrawal
hello all, what if character are not ASCII but are Unicode characters. then we will need 8 KB of memory instead of 32 bytes as in for ASCII's would that also be considered as Constant space( O(1) ) as it is independent of input size ?? -- You received this message because you are subscribed to th

[algogeeks] [brain teaser ] Probability Riddle Loaded Revolver 13 june

2011-06-13 Thread Lavesh Rawat
*Probability Riddle Loaded Revolver - 13* June * * ** *Henry has been caught stealing cattle, and is brought into town for justice. The judge is his ex-wife Gretchen, who wants to show him some sympathy, but the law clearly calls for two shots to be taken at Henry from close range. To make things