Re: [algogeeks] Codeforces Problem

2012-08-14 Thread Dipit Grover
Hi, you just need to see the figure carefully and derive a simple formula
here. The tiles are all regular hexagons and The figure shown is for the
given sample case where a=2,b=3,c=4, thereby implying that each side of the
hexagonal tile(say, x) satisfies :

x*(cos 30) = 1/2;

Thanks

Digo

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Hii

2012-08-14 Thread shady
already answered one day back, present in archives
* EOD **

On Wed, Aug 15, 2012 at 2:38 AM, ragavenderan venkatesan <
ragavende...@gmail.com> wrote:

> Okk
>
> So how can we go about this problem then
>
> Given an array of 32bit unsigned integers in which every number appears
> exactly twice except three of them, find those three numbers in O(n) time
> using O(1) extra space. The input array is read-only. What if there are k
> exceptions instead of 3?
>
>
>
> On Tue, Aug 14, 2012 at 2:07 PM, Arpit Sood  wrote:
>
>> no, because there is more than one possibility.
>>
>>
>> On Wed, Aug 15, 2012 at 2:34 AM, ragavenderan venkatesan <
>> ragavende...@gmail.com> wrote:
>>
>>> for 2 numbers?
>>>
>>>
>>> On Tue, Aug 14, 2012 at 2:00 PM, shady  wrote:
>>>
 not possible.

 On Wed, Aug 15, 2012 at 2:26 AM, ragavenderan venkatesan <
 ragavende...@gmail.com> wrote:

> Given Xor of 3 numbers, How can we derive back those 3 numbers?
> Can any one explain with an example?
>
>
> Thanks
>
> Ragavenderan
>
> --
> 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, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

  --
 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, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.

>>>
>>>  --
>>> 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, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>
>>
>> --
>> Regards,
>> Arpit Sood
>>
>>  --
>> 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, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> 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, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: AMAZON: given col id, print col name in excel

2012-08-14 Thread shady
nope, doesnt work
even taking a simpler case like
a, b, aa, ab, ba, bb, aaa, aab, aba, abb...

using base 2 doesn't give correct results

On Mon, Aug 13, 2012 at 3:33 AM, vivek rungta wrote:

> its base 26 but little modification in code ...
> @shiv - nice solution .
>
> char Carr[26]={a,b,c...z}
> i=0;
> int arr[];
> do
> {
> arrr[i++]=n%26;
> n=(n/26)-1;
> }
> while(n) ;
> for(int i=n-1;i>=0;i--)
> cout<
>
>
> On Sat, Aug 11, 2012 at 9:52 PM, yq Zhang  wrote:
>
>> No. It's not base 26 at all. Given input 26, your code will return ba,
>> but the result should be aa. It's not equivalent to a number.
>>
>>
>> On Sat, Aug 11, 2012 at 2:57 AM, shiv narayan 
>> wrote:
>>
>>> yes actually we have to print a,b,c..z instead of nos , so for that i
>>> have stored nos in character array  so only characters will be printed not
>>> nos
>>>
>>>
>>> On Sat, Aug 11, 2012 at 2:18 AM, yq Zhang wrote:
>>>
 @shiv, your code is correct go compute the base 26 number. However,
 this question is not base 26 number obviously.



 On Wed, Aug 8, 2012 at 4:46 AM, shiv narayan >>> > wrote:

> this is similar to conversion of no in base 26.( where digits are
> a,b,c,d...z) just think it like decimal to binary conversion here base is
> instead 26.
>
> char Carr[26]={a,b,c...z}
> i=0;
> int arr[];
> do
> {
> arrr[i++]=n%26;
> n/=2;
> }
> while(n) ;
> for(int i=n-1;i>=0;i--)
> cout<
> correct me if i am wrong.
> On Wednesday, 8 August 2012 12:56:56 UTC+5:30, ashgoel wrote:
>>
>> Imagine a sequence like this: a, b, c...z, aa, ab, ac...zz, aaa, aab,
>> aac aax, aaz, aba, abc... (Its same as excel column names). Given an
>> integer (n), generate n-th string from the above sequence.
>>
>> Best Regards
>> Ashish Goel
>> "Think positive and find fuel in failure"
>> +919985813081
>> +919966006652
>>
>  --
> 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/-/Z3kYiTZi_F8J.
>
> 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, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

  --
 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, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.

>>>
>>>
>>>
>>> --
>>> Shiv Narayan Sharma
>>> Jt. Secretary CSI-DTU
>>> +919971228389
>>> www.jugadengg.com
>>>
>>>
>>>
>>>
>>>  --
>>> 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, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  --
>> 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, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> 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, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Hii

2012-08-14 Thread ragavenderan venkatesan
Okk

So how can we go about this problem then

Given an array of 32bit unsigned integers in which every number appears
exactly twice except three of them, find those three numbers in O(n) time
using O(1) extra space. The input array is read-only. What if there are k
exceptions instead of 3?



On Tue, Aug 14, 2012 at 2:07 PM, Arpit Sood  wrote:

> no, because there is more than one possibility.
>
>
> On Wed, Aug 15, 2012 at 2:34 AM, ragavenderan venkatesan <
> ragavende...@gmail.com> wrote:
>
>> for 2 numbers?
>>
>>
>> On Tue, Aug 14, 2012 at 2:00 PM, shady  wrote:
>>
>>> not possible.
>>>
>>> On Wed, Aug 15, 2012 at 2:26 AM, ragavenderan venkatesan <
>>> ragavende...@gmail.com> wrote:
>>>
 Given Xor of 3 numbers, How can we derive back those 3 numbers?
 Can any one explain with an example?


 Thanks

 Ragavenderan

 --
 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, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.

>>>
>>>  --
>>> 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, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  --
>> 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, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> Regards,
> Arpit Sood
>
>  --
> 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, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Hii

2012-08-14 Thread Arpit Sood
no, because there is more than one possibility.

On Wed, Aug 15, 2012 at 2:34 AM, ragavenderan venkatesan <
ragavende...@gmail.com> wrote:

> for 2 numbers?
>
>
> On Tue, Aug 14, 2012 at 2:00 PM, shady  wrote:
>
>> not possible.
>>
>> On Wed, Aug 15, 2012 at 2:26 AM, ragavenderan venkatesan <
>> ragavende...@gmail.com> wrote:
>>
>>> Given Xor of 3 numbers, How can we derive back those 3 numbers?
>>> Can any one explain with an example?
>>>
>>>
>>> Thanks
>>>
>>> Ragavenderan
>>>
>>> --
>>> 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, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  --
>> 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, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> 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, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards,
Arpit Sood

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Hii

2012-08-14 Thread ragavenderan venkatesan
for 2 numbers?

On Tue, Aug 14, 2012 at 2:00 PM, shady  wrote:

> not possible.
>
> On Wed, Aug 15, 2012 at 2:26 AM, ragavenderan venkatesan <
> ragavende...@gmail.com> wrote:
>
>> Given Xor of 3 numbers, How can we derive back those 3 numbers?
>> Can any one explain with an example?
>>
>>
>> Thanks
>>
>> Ragavenderan
>>
>> --
>> 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, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> 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, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Hii

2012-08-14 Thread shady
not possible.

On Wed, Aug 15, 2012 at 2:26 AM, ragavenderan venkatesan <
ragavende...@gmail.com> wrote:

> Given Xor of 3 numbers, How can we derive back those 3 numbers?
> Can any one explain with an example?
>
>
> Thanks
> Ragavenderan
>
> --
> 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, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Hii

2012-08-14 Thread ragavenderan venkatesan
Given Xor of 3 numbers, How can we derive back those 3 numbers?
Can any one explain with an example?


Thanks
Ragavenderan

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Codeforces Problem

2012-08-14 Thread shady
Hey all,
I fail to understand this problem, can anyone tell what do we need to do ?
Sides of a hexagon is given, but we dont know the tile size.

http://codeforces.com/problemset/problem/216/A

Shady

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Constant time solution needed

2012-08-14 Thread ~*~VICKY~*~
Hey I just gave an idea, I believe solve it yourself :) I appreciate your
effort.

On Tue, Aug 14, 2012 at 4:34 PM, Kailash Bagaria  wrote:

> @vicky
> your approach doesn't work for  (x1,y1) = (1,2)
>   (x2,y2) = (2,3)
>
> By your Approach:-
>   Ans= sumArray[x2][y2] - sumArray[x1][y1] +
> ip[x1][y1]=66-18+6=*54*
> But Actual Ans is 6+7+10+11=*34*
>
> On Sun, Aug 12, 2012 at 8:19 PM, ~*~VICKY~*~ wrote:
>
>> Lets build the array for the example you gave.
>>
>> i/p:
>>
>> 0 1 2 3
>> 4 5  6 7
>> 8 9 10 11
>>
>> (x1,y1) = (0,0)
>> (x2,y2) = (1,2)
>> sumArray
>> 0  1 23
>> 4  10  18   28
>> 12 27  45  66
>> (will take O(n^2) to build above array)
>> So now when you get coordinates as input, you can calc the sum by
>>
>> Ans = sumArray[x2][y2] - sumArray[x1][y1] + ip[x1][y1]
>>
>> For our case it will be Ans = 18-0+0 = 18
>>
>> Please lemme know if any bugs with the logic.
>>
>>
>> On Sun, Aug 12, 2012 at 6:27 PM, Srividhya Sampath <
>> srisam261...@gmail.com> wrote:
>>
>>>
>>> @ Vicky
>>>
>>> Can yo explain with an illustration ?
>>>
>>>
>>> On Sat, Aug 11, 2012 at 10:07 PM, ~*~VICKY~*~ 
>>> wrote:
>>>
 May be you can consider creating a 2d array to pre process and store
 all the rectangle sums as a dependent subproblem, the sum of larger rect
 will be currValuesAdded+OldRectSum. So when you get the coordinate as input
 u can calc the needed sum by subtracting sum of big rect and small rect
 which is not included in the given coordinates. This can be called constant
 time if u don't include the preprocessing time.


 On Sat, Aug 11, 2012 at 9:57 PM, adarsh kumar wrote:

> Sum of the integers meaning? Do you mind giving an example test case?
>
> regards.
>
> On Sat, Aug 11, 2012 at 7:10 PM, Srividhya wrote:
>
>> hi all:)
>>
>> The coordinates of a rectangle will be specified. there is a matrix
>> of integers. yo should find the sum of the integers that fall in the 
>> region
>> specified by the  coordinates .
>>
>> The solution to be in constant time .
>>
>> --
>> 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/-/qHSmXBshmS4J.
>> 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, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> 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, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



 --
 Cheers,

   Vicky

  --
 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, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.

>>>
>>>  --
>>> 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, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>
>>
>> --
>> Cheers,
>>
>>   Vicky
>>
>>  --
>> 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, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
>
> --
>
> ‘Kailash Bagaria’
> B-tech 4th year
> Computer Science & Engineering
> Indian Institute of Technology, Roorkee
> Roorkee, India (247667)
>
>  --
> 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, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Cheers,

  Vicky

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@google

Re: [algogeeks] Constant time solution needed

2012-08-14 Thread Kailash Bagaria
@vicky
your approach doesn't work for  (x1,y1) = (1,2)
  (x2,y2) = (2,3)

By your Approach:-
  Ans= sumArray[x2][y2] - sumArray[x1][y1] + ip[x1][y1]=66-18+6=
*54*
But Actual Ans is 6+7+10+11=*34*

On Sun, Aug 12, 2012 at 8:19 PM, ~*~VICKY~*~ wrote:

> Lets build the array for the example you gave.
>
> i/p:
>
> 0 1 2 3
> 4 5  6 7
> 8 9 10 11
>
> (x1,y1) = (0,0)
> (x2,y2) = (1,2)
> sumArray
> 0  1 23
> 4  10  18   28
> 12 27  45  66
> (will take O(n^2) to build above array)
> So now when you get coordinates as input, you can calc the sum by
>
> Ans = sumArray[x2][y2] - sumArray[x1][y1] + ip[x1][y1]
>
> For our case it will be Ans = 18-0+0 = 18
>
> Please lemme know if any bugs with the logic.
>
>
> On Sun, Aug 12, 2012 at 6:27 PM, Srividhya Sampath  > wrote:
>
>>
>> @ Vicky
>>
>> Can yo explain with an illustration ?
>>
>>
>> On Sat, Aug 11, 2012 at 10:07 PM, ~*~VICKY~*~ wrote:
>>
>>> May be you can consider creating a 2d array to pre process and store all
>>> the rectangle sums as a dependent subproblem, the sum of larger rect will
>>> be currValuesAdded+OldRectSum. So when you get the coordinate as input u
>>> can calc the needed sum by subtracting sum of big rect and small rect which
>>> is not included in the given coordinates. This can be called constant time
>>> if u don't include the preprocessing time.
>>>
>>>
>>> On Sat, Aug 11, 2012 at 9:57 PM, adarsh kumar wrote:
>>>
 Sum of the integers meaning? Do you mind giving an example test case?

 regards.

 On Sat, Aug 11, 2012 at 7:10 PM, Srividhya wrote:

> hi all:)
>
> The coordinates of a rectangle will be specified. there is a matrix of
> integers. yo should find the sum of the integers that fall in the region
> specified by the  coordinates .
>
> The solution to be in constant time .
>
> --
> 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/-/qHSmXBshmS4J.
> 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, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

  --
 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, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.

>>>
>>>
>>>
>>> --
>>> Cheers,
>>>
>>>   Vicky
>>>
>>>  --
>>> 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, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  --
>> 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, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> Cheers,
>
>   Vicky
>
>  --
> 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, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 

--

‘Kailash Bagaria’
B-tech 4th year
Computer Science & Engineering
Indian Institute of Technology, Roorkee
Roorkee, India (247667)

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] direct i online test

2012-08-14 Thread enjoy_nac
For N=1000, the above code fails, how is the mod 17 included??  

>
>
>

-- 
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/-/OkWbb2TmvGEJ.
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Given an array of 32bit unsigned integers in which every number appears exactly twice except three of them, find those three numbers in O(n) time using O(1) extra space

2012-08-14 Thread Kailash Bagaria
http://www.mycareerstack.com/question/279/find-out-non-repeating-numbers/
go through above link.you can expand it's idea for your case ...enjoy :)

On Mon, Aug 13, 2012 at 4:42 PM, vivek rungta wrote:

>
>
> On Mon, Aug 13, 2012 at 4:39 PM, vivek rungta wrote:
>
>>
>> @Navin- Its only for continuous number :- if  size of array >= max-min
>> for Non continuous it takes O(R) space complexity as suggested by  daksh.
>> where R is range of number.
>>
>>
>>
>> On Mon, Aug 13, 2012 at 2:55 PM, Navin  wrote:
>>
>>> @vivek :- what if the array index goes out of bound.
>>> I mean if |max - min | > size of the array, then how will u mark the
>>> element as negative/positive because that  index doesn't exist even.
>>> It won't work in that case.
>>>
>>>
>>>
>>>  --
>>> 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/-/DXEES3kjKJoJ.
>>>
>>> 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, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>
>  --
> 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, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 

--

‘Kailash Bagaria’
B-tech 4th year
Computer Science & Engineering
Indian Institute of Technology, Roorkee
Roorkee, India (247667)

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.