http://stackoverflow.com/questions/2032153/how-to-find-pythagorean-triplets-in-an-array-faster-than-on2
It provides a perfect solution
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroup
@Saurabh: +1 for your second code.
On Sun, Aug 7, 2011 at 12:17 PM, Amol Sharma wrote:
> nice :)
> --
>
>
> Amol Sharma
> Third Year Student
> Computer Science and Engineering
> MNNIT Allahabad
>
>
>
>
> On Sun, Aug 7, 2011 at 8:16 AM, saurabh singh wrote:
>
>> Yup it was due to compiler optimi
nice :)
--
Amol Sharma
Third Year Student
Computer Science and Engineering
MNNIT Allahabad
On Sun, Aug 7, 2011 at 8:16 AM, saurabh singh wrote:
> Yup it was due to compiler optimization.check this link now,,,
> http://ideone.com/f7keg
>
>
> On Sun, Aug 7, 2011 at 8:02 AM, saurabh singh
@raghvan: take care of space complexityyou are using extra space that
too O(n) in worst case...
can be done in O(nlogn)
else it can be done in O(n) if the given array is sorted in two traversals
!!
--
Amol Sharma
Third Year Student
Computer Science and Engineering
MNNIT Allahabad
On Sun
Dave shouldn't it be :: E(x) = Summation( xp(x) ) thus it should
be 1*1/2 + 2*(1/2 * 1/2) + 3*(1/2 * 1/2 * 1/2) .
On Sun, Aug 7, 2011 at 11:55 AM, Nitish Garg wrote:
> @Dave - Can you please explain how did you generate the series? Shouldn't
> it be : 1/2 + 2(1/4) + 3(1/8) and so
@harshal: What was your score in the written round??
>
--
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...@go
And the last option?? Will that terminate too??
On Sun, Aug 7, 2011 at 11:48 AM, ankit sambyal wrote:
> @programming love : 0.1 can't be represented accurately in binary. If u try
> to convert it into binary, it will not terminate. Try it !! But 6.5 can be
> converted.
>
> --
> You received this
@Dave - Can you please explain how did you generate the series? Shouldn't it
be : 1/2 + 2(1/4) + 3(1/8) and so on?
--
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/algo
Method 1 :
Use character array to store large number .
Define addition & subtraction function for the following representation of
number .
Using addition & subtraction number u can write another operation for the
library e.g. multiplication , division , modulus etc .
Method 2 :
Use Linked list to
@programming love : 0.1 can't be represented accurately in binary. If u try
to convert it into binary, it will not terminate. Try it !! But 6.5 can be
converted.
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send ema
Why is it so and y can't 0.1 be represented accurately in binary?? And what
about the last option??
On Sun, Aug 7, 2011 at 11:43 AM, ankit sambyal wrote:
> @programming love : 6.5 can be represented accurately in binary
>
> --
> You received this message because you are subscribed to the Google G
@programming love : 6.5 can be represented accurately in binary
--
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
can any1 plz gv the solution of the following problem ;-
You have to make a package library which will do the calculation of
(a^b)mod(c), where a, b, c are very large size of 1 digits. (^-
power).
Design a data structure for the numbers' storage and suggest what
functions
will you be providing
So is q 1 a C++ question??
On Sun, Aug 7, 2011 at 11:27 AM, hary rathor wrote:
> no c doesn't
>
> --
> 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 th
Why can't it be option b for 3rd one??
On Sun, Aug 7, 2011 at 11:30 AM, sukran dhawan wrote:
> a
>
> On Sun, Aug 7, 2011 at 11:07 AM, programming love <
> love.for.programm...@gmail.com> wrote:
>
>> What is the answer for 3rd one?? 4th is 5.
>>
>> --
>> You received this message because you are s
a
On Sun, Aug 7, 2011 at 11:07 AM, programming love <
love.for.programm...@gmail.com> wrote:
> What is the answer for 3rd one?? 4th is 5.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@
no c doesn't
--
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
Does C support default arguments in function prototype??
--
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...@goo
good answer
On 6 August 2011 22:46, programming love wrote:
> *a nice post to find the number of zeroes in product of first n natural
> numbers!*
> http://forums.sureshkumar.net/brain-teasers-puzzles/22998-number-zeros.html
>
> --
> You received this message because you are subscribed to the
*a nice post to find the number of zeroes in product of first n natural
numbers!*
http://forums.sureshkumar.net/brain-teasers-puzzles/22998-number-zeros.html
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to
@delip ; have you not got that it require single strict O(n) just single
pass you are doing it in O(n^2)
--
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
@Coder: Sort the array into ascending order of the squares of the
values; e.g., if the data is -2, 1, 3, then the sorted result should
be 1, -2, 3 because 1*1 < (-2)*(-2) < 3*3. Then apply the following
pseudo-code:
for k = 3 to n // 1-based indexing assumed
i = 1
j = k-1
while i < j d
in a 64 bit computer is that is capable of transfer 64 bit at a time
64 bit os means it capable of handle these 64 bit at time .but 32 it os use
only half of bus
so "theorytically not practically" 64 bit is 8 time faster than 32 bit os .
and 64 bit os can address more ram at time .
cause of wide 6
What is the answer for 3rd one?? 4th is 5.
--
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.
difference between 64-bit compiler and 64-bit operating
system..sizeof any data type depends on compiler or operating
system
--
*UTKARSH SRIVASTAV
CSE-3
B-Tech 3rd Year
@MNNIT ALLAHABAD*
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks"
We can have a sorted sequence and display them in random order, but
that is the same problem. How do we display them in random order? We
need to have a sequence of random indices, that is the same problem as
having random numbers, isn't it.
Moreover, I don't think collisions can be avoided in less
@saurabh:wen wer the 5 rounds of puzzles asked??during interview?
On Sun, Aug 7, 2011 at 8:23 AM, saurabh singh wrote:
> Its lot of apti and damn easy c in technichal part,The paper was of 45 min
> duration in which we had to do 35 questions(25 apti 10 tech),It was followed
> by a group discussio
given an array find all triplets such that a^2+b^2=c^2
--
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...@googl
Thats True , Even insertion and merge sorts are too ..
!!!
Rahul
On Sun, Aug 7, 2011 at 10:20 AM, Gaurav Menghani
wrote:
> "The Postman's sort is a variant of bucket sort that takes advantage
> of a hierarchical structure of elements, typically described by a set
> of attributes."
>
> It is j
"The Postman's sort is a variant of bucket sort that takes advantage
of a hierarchical structure of elements, typically described by a set
of attributes."
It is just a variant of Bucket Sort.
On Sun, Aug 7, 2011 at 12:42 AM, rahul rai wrote:
> http://www.rrsd.com/software_development/postmans_so
---
Anubhav Aggarwal wants to stay in better touch using some of Google's
coolest new
products.
If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-aae2a11493-481f13b152-0NvcH9sxaSedEz97rN7rdin9p9Q
You'
default arguments are added right to left , in first one it is left to
right thats why error
On Sat, Aug 6, 2011 at 9:41 AM, siddharth srivastava wrote:
> Hi
>
> On 6 August 2011 12:08, swetha rahul wrote:
>
>> Hi,
>>
>> Q.No:1
>> what is wrong here
>> void foo(int x=10,int y)
>> how compile
5
/\
6 7
/
8
Here the centre is both 5 and 6 . we need to find both of them..:)
Cheers
~ Jeeva ~
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroup
on gcc it is 16 bytes and on dev cpp its 24 bytes
On Sat, Aug 6, 2011 at 11:10 AM, siddharth srivastava
wrote:
>
>
> On 6 August 2011 23:27, Nitin wrote:
>
>> I am also getting 24 bytes but y it is taking it every data type as 8,8,8
>> as if we take it alone it is 1 for char and 4 for int a
congrats man
On Sat, Aug 6, 2011 at 5:14 AM, parag khanna wrote:
> congrats dude ... can u plz tell me the questions asked ... microsoft is
> visiting our campus on 29th
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to thi
select top 1 salary from(select top 6 salary from employee
order by salary desc)asc
On Sat, Aug 6, 2011 at 6:40 PM, Reynald wrote:
> Could anyone please explain me how this query selects the employee
> with nth highest salary?
>
> select last_name, salary from employees e1
> where &n = (select
Its lot of apti and damn easy c in technichal part,The paper was of 45 min
duration in which we had to do 35 questions(25 apti 10 tech),It was followed
by a group discussion on social networking.Then interviews.5 rounds puzzles
were also asked.Most of them were standard puzzles..
On Sun, Aug 7, 20
Yup it was due to compiler optimization.check this link now,,,
http://ideone.com/f7keg
On Sun, Aug 7, 2011 at 8:02 AM, saurabh singh wrote:
> The value of a has changed but it doesnt appears so...Thats bcoz the
> compilers are smart enough in dealing with const variables...The value has
> ch
The value of a has changed but it doesnt appears so...Thats bcoz the
compilers are smart enough in dealing with const variables...The value has
changed but doesnt appears so when you print it.
On Sun, Aug 7, 2011 at 1:15 AM, Jyoti Gupta <2006gu...@gmail.com> wrote:
> but how do they both poin
inplace?
On Sat, Aug 6, 2011 at 10:27 PM, immanuel kingston <
kingston.imman...@gmail.com> wrote:
> Yes. just remove the recursive part using 2 stacks.
>
> Thanks,
> Immanuel
>
> On Fri, Aug 5, 2011 at 6:51 PM, Nitin Nizhawan
> wrote:
>
>> does anyone know of any in-place, iterative mergesort a
Could anyone please explain me how this query selects the employee
with nth highest salary?
select last_name, salary from employees e1
where &n = (select count(distinct(salary)) from employees e2
where e2.salary >= e1.salary);
--
You received this message because you are subscribed to the Google
@Yasir
Thanks bro :)
On Sat, Aug 6, 2011 at 7:13 PM, Yasir wrote:
> Same as of DS & Algo in GATE exam.
> http://geeksforgeeks.org/?cat=66
>
> On Aug 7, 2:29 am, Ankur Garg wrote:
> > @Yasir
> >
> > MCQ are of which types ???
> >
> > Regards
> >
> > Ankur Garg
> >
> >
> >
> >
> >
> >
> >
> > On
Same as of DS & Algo in GATE exam.
http://geeksforgeeks.org/?cat=66
On Aug 7, 2:29 am, Ankur Garg wrote:
> @Yasir
>
> MCQ are of which types ???
>
> Regards
>
> Ankur Garg
>
>
>
>
>
>
>
> On Sat, Aug 6, 2011 at 4:45 PM, Yasir wrote:
> > Earlier they had telephonic interview as first round but no
Guys ! If the i=n is a printing error, then its Ok. But if its not,
shouldn't an assignment statement evaluate to a TRUE every time and
the construct goes into an infinite loop. Am i going wrong somewhere ?
On Aug 6, 10:13 pm, "pacific :-)" wrote:
> I believe the answer for fifth one is o(n2) ,
Guys ! If the i=n is a printing error, then its Ok. But if its not,
shouldn't an assignment statement evaluate to a TRUE every time and
the construct goes into an infinite loop. Am i going wrong somewhere ?
On Aug 6, 9:18 pm, i love programming
wrote:
> Hello guys!
> Try finding answers for the M
@Yasir
MCQ are of which types ???
Regards
Ankur Garg
On Sat, Aug 6, 2011 at 4:45 PM, Yasir wrote:
> Earlier they had telephonic interview as first round but now this
> online exam has become initial screening test.
> Based on ur online test's performance they call for phonic round or on-
> si
@Shady: There is a 1/2 probability of getting an even number on the
first roll. In the 1/2 of the cases where the first roll is odd, roll
again and note that there is a 1/2 chance of getting an odd number.
Etc. The probability of needing n rolls is 1/2 to the nth power.
The series is 1 + 2 * (1/2)
Almost same.
For big probs, they don't ask for running code. Only pseudo-code is
enough.
On Aug 6, 9:42 pm, Ankur Garg wrote:
> The questions in the link are quite decent...Is the toughness level of
> Amazon test same or more ?
>
>
>
>
>
>
>
> On Sat, Aug 6, 2011 at 11:47 AM, shady wrote:
> > @n
Earlier they had telephonic interview as first round but now this
online exam has become initial screening test.
Based on ur online test's performance they call for phonic round or on-
site interview.
In online test, there there are 10 mcq questions and 5 coding probs.
Cheers \o/
On Aug 6, 7:17
thanx mukul for explanation checked it randomly on 123.. it works
fine...
On Sat, Aug 6, 2011 at 11:27 PM, Ashish Sachdeva wrote:
> mukul, pls explain my following doubts:
> 1. whats the need of subtracting the numbers, like u subtracted 91 then 52
> etc...
> 2. the ones digit 7 is ok... did
i attempted a problem
http://www.spoj.pl/problems/ABCD/
my logic is scan the input string and record the count of A, B, C, D in
array of size 4
now sort the count array
in the output array at first position put an element from count array
whose count is less than n and not equal to elem
@all : I Think the output depends on whether it is row major or column
major representation in memory .
Does he row major or column major representations matter
in calculations above???
On Aug 6, 11:49 pm, aditi garg wrote:
> oh @ akshay y ru doing 10x4??? 10 is the no of rows not th
@aditi : I Think the output depends on whether it is row major or column
major representation in memory .
Does he row amjor or column
On Sun, Aug 7, 2011 at 12:19 AM, aditi garg wrote:
> oh @ akshay y ru doing 10x4??? 10 is the no of rows not the columns so it
> shud be 15x3+4...and
but how do they both point to same address location ??
On 7 August 2011 01:05, jagrati verma wrote:
> thanku all.
>
> On Sun, Aug 7, 2011 at 12:58 AM, Debabrata Das
> wrote:
> > try this:
> > const int a=54;
> >int *p=(int *)&a;
> >*p=100;
> >printf("
Lvalue assigment error.
On Sat, Aug 6, 2011 at 4:05 PM, Rajesh Kumar wrote:
> How to remove error in this code?
>
> #include
> main()
> {
> int i=10,j=15;
> if(i%2=j%3)
> printf("\ncharacter");
> }
>
> --
> Regards
> Rajesh Kumar
>
>
> --
> You received this message because you are subscribed to
no questions~ yet!!!
On 7 August 2011 00:45, Nitish Garg wrote:
> I was just telling not to post the schedule, posting questions was never
> the problem. :)
>
>
> On Sun, Aug 7, 2011 at 12:42 AM, gaurav kumar wrote:
>
>> @nitish i agree to your point of college policy. But think of the
>> suppo
i got it.
On Sun, Aug 7, 2011 at 1:04 AM, TheMitraBoy wrote:
> It usually happens when you copy some code from a website. Its not
> visible in editors like Notepad++ and all. Open your code in an editor
> like 'vi' ( 'vim' in Windows) . There you can see the stray
> characters and delete
thanku all.
On Sun, Aug 7, 2011 at 12:58 AM, Debabrata Das
wrote:
> try this:
> const int a=54;
> int *p=(int *)&a;
> *p=100;
> printf("%d\n",*p);
> printf("%x %x",p,&a);
>
>
>
> On Sun, Aug 7, 2011 at 12:28 AM, UTKARSH SRIVASTAV
> wrote:
>> yes sa
It usually happens when you copy some code from a website. Its not
visible in editors like Notepad++ and all. Open your code in an editor
like 'vi' ( 'vim' in Windows) . There you can see the stray
characters and delete it.
On Aug 6, 10:57 pm, jagrati verma wrote:
> error: stray ‘\342’ in progra
try this:
const int a=54;
int *p=(int *)&a;
*p=100;
printf("%d\n",*p);
printf("%x %x",p,&a);
On Sun, Aug 7, 2011 at 12:28 AM, UTKARSH SRIVASTAV
wrote:
> yes saurabh the value of a has not changed
>
> On Sat, Aug 6, 2011 at 11:20 AM, aditi garg
> wrote:
>>
>> @sa
(for first outcome odd) 1/6 * 3/6 + (for first outcome even) 1/6 * 3/6 =
1/6 so expected 6 cases.
On Sat, Aug 6, 2011 at 8:04 PM, shady wrote:
> Hi,
>
> A fair dice is rolled. Each time the value is noted and running sum is
> maintained. What is the expected number of runs needed so that the su
I was just telling not to post the schedule, posting questions was never the
problem. :)
On Sun, Aug 7, 2011 at 12:42 AM, gaurav kumar wrote:
> @nitish i agree to your point of college policy. But think of the
> support/help which we can get through u guys in advance for a
> particular company.
@nitish i agree to your point of college policy. But think of the
support/help which we can get through u guys in advance for a
particular company. even u people of dce also need this . I request u
to post as much questions of interview/written on this platform. it is
really helpful.
On Aug 7, 12:
http://www.rrsd.com/software_development/postmans_sort/cuj/cuj.htm
On 8/5/11, Gaurav Menghani wrote:
> I agree with Dilip. It depends upon what type of input you have at hand.
>
> - Suppose you have an array having a million elements, where the
> elements are in the range 1-3, counting sort would
It's against the Placement Policy to post the schedule of the companies
visiting DCE. I am not against sharing the knowledge, its just that we
should follow some rules related to the college.
On Sun, Aug 7, 2011 at 12:30 AM, arvind kumar wrote:
> @nitish:wats wrong in doing so?the whole point of
@Kumar: Although it would be natural to use base 10 when you are using
paper and pencil, you don't have to use base 10 to do your radix sort
on a computer, where the numbers are stored internally in binary
format. So use a base that is a power of 2 so that you can use a shift
and a logical product
@nitish:wats wrong in doing so?the whole point of a group is to share
things..n this is not a thing thats not supposed to be shared.
On Sun, Aug 7, 2011 at 12:26 AM, Nitish Garg wrote:
> @Shashank @Sameer
> Please do not post the schedule of the companies that are going to visit
> the campus.
>
>
yes saurabh the value of a has not changed
On Sat, Aug 6, 2011 at 11:20 AM, aditi garg wrote:
> @saurabh
> http://ideone.com/J0gNi
> its jst pointing to same address bt it has not modified the value...chk the
> abv link...
>
> On Sat, Aug 6, 2011 at 8:13 PM, saurabh singh wrote:
>
>>
>> http://i
@Shashank @Sameer
Please do not post the schedule of the companies that are going to visit the
campus.
--
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/-/Y_ph
oh @ akshay y ru doing 10x4??? 10 is the no of rows not the columns so it
shud be 15x3+4...and by multiplying by 4(in 10x4) ur taking it to the 5th
row ie A[4][4] its only A[3][4]...
i hope its clear now
On Sun, Aug 7, 2011 at 12:14 AM, akshay khatri wrote:
>
>
> On 6 August 2011 23:56, adit
@Immanuel: First, TopLeft and BottomRight or the alternative are
insufficient to specify non-axis-aligned rectangles.
Second, what we can say is that if the rectangles overlap then the
shadows will overlap, but we cannot say that if the shadows overlap
then the rectangles overlap; e.g., take the r
On 6 August 2011 23:56, aditi garg wrote:
> @akshay: what i meant ws suppose the array strted from in decimal...so
> A[3][4] wud be at 0049 and B[3][4] will be at 0196
> convert dese 2 values to hex it gives 31 and C4 respectively...now base
> address is 1000 and 2000 instead if so add
@Kunal: Perhaps, you are right :)
On Sat, Aug 6, 2011 at 11:45 PM, Kunal Yadav wrote:
> According to me if we get even number in first case then the series will
> end there only as we just need an even sum. Similarly in case of e(3) the
> only possible sequence for which the sum is even in exact
My accepted solution is this and I have told you my logic
#include
struct node
{
int data;
int add;
struct node *next;
}*front,*rear;
int flag,c;
int fun(int item)
{
struct node *temp,*temp2,*r,*p,*q;
int k,i;
r=(struct node*)malloc(sizeof(struct node));
So Basically I drew this conclusion ( Correct if I am wrong)
On Gcc
char 1 byte but allocates 4 bytes padding 3 bytes for performance
improvement. 4
double 8 bytes allocates 8 bytes ( multiple of 4 so no probs no padding)
8
int 4 bytes allocates 4 bytes.
4
-
Thanks a lot :)
On Sat, Aug 6, 2011 at 11:53 PM, ankit sambyal wrote:
> yeah Siddarath's point is correct that they do hv preprocessors to prevent
> multiple includes. And they would be using #ifndef instead of #pragma as it
> is not a documented standard
>
> --
> You received this message becaus
@akshay: what i meant ws suppose the array strted from in decimal...so
A[3][4] wud be at 0049 and B[3][4] will be at 0196
convert dese 2 values to hex it gives 31 and C4 respectively...now base
address is 1000 and 2000 instead if so add the base address and u get
the ans 1031 and 20C4...i
On 6 August 2011 23:27, jagrati verma wrote:
> error: stray ‘\342’ in program
>
just to add:
it can also be due to single quotes
If you have copied code from some site having fancy styling, it can be a
reason for the error
>
> --
> You received this message because you are subscribed to the Goo
yeah Siddarath's point is correct that they do hv preprocessors to prevent
multiple includes. And they would be using #ifndef instead of #pragma as it
is not a documented standard
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to thi
@ KK, congrats man!! awesome. :)
@ Anuj, it's Microsoft IDC, and package offered is 16 lacs in India or 65
lacs in US. Choice was ours. Infact, they were convincing us to take
Redmond.
I have written my experience on web for my friends to see, have a look at it
if you are interested in the whole
@saurabh
http://ideone.com/J0gNi
its jst pointing to same address bt it has not modified the value...chk the
abv link...
On Sat, Aug 6, 2011 at 8:13 PM, saurabh singh wrote:
>
> http://ideone.com/Wszkg
>
> On Sat, Aug 6, 2011 at 8:03 PM, jagrati verma > wrote:
>
>> how can modify constant varia
first transpose it
now reverse colums if u want a clockwise rotation
else reverse rows for anti clockwise rotation
On Sat, Aug 6, 2011 at 11:48 PM, Algo Lover wrote:
> Can anyone solve this problem without using extra matrix
>
> --
> You received this message because you are subscribed to the
On 6 August 2011 23:40, aditi garg wrote:
> A[3][4] wud be in the 4th row...so strtung address of 4th row wud be
> 46..and thn 4th element wud be at 49...similarly fr B 180 fr the frst 3 rows
> + 16 fr the 4th elemnet so 196
>
How does it start from 46 and 180 ?
as per my knowledge, 0x1000 = 409
On 6 August 2011 23:28, aditi garg wrote:
> I have read that to avoid multiple declaration error we write #pragma
> once in header files or use #ifndef and #def to make sure that the
> header file is included only once...
> i tried running a prog in whch i included stdio.h thrice bt it dint gv
>
Can anyone solve this problem without using extra matrix
--
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...@goo
I think you copied and pasted the code from some resource and then tried to
compile it.
The error shown above are usually "smart quotes" they are shown usually when
there is problem with the double quotation marks in the program (printf)
So to remove that error, remove the double quotation marks i
According to me if we get even number in first case then the series will end
there only as we just need an even sum. Similarly in case of e(3) the only
possible sequence for which the sum is even in exactly 3 turns is odd then
even and then odd.
On Sat, Aug 6, 2011 at 11:40 PM, Mukul Gupta wrote:
@shady- yes
On Aug 6, 9:42 pm, Ankur Garg wrote:
> The questions in the link are quite decent...Is the toughness level of
> Amazon test same or more ?
>
>
>
>
>
>
>
> On Sat, Aug 6, 2011 at 11:47 AM, shady wrote:
> > @nivedita this is for job right ?
>
> > On Sat, Aug 6, 2011 at 9:14 PM, nivedit
anyone plz give hint how to solve this problem !!
--
Amol Sharma
Third Year Student
Computer Science and Engineering
MNNIT Allahabad
On Sat, Aug 6, 2011 at 2:53 PM, Amol Sharma wrote:
> http://www.spoj.pl/SPOJ/problems/TUG/
>
> earlier i thought it would be easy to do it knapsack...but when
A[3][4] wud be in the 4th row...so strtung address of 4th row wud be 46..and
thn 4th element wud be at 49...similarly fr B 180 fr the frst 3 rows + 16 fr
the 4th elemnet so 196
On Sat, Aug 6, 2011 at 11:37 PM, akshay khatri wrote:
> how is that 49 bytes and 196 bytes
> shouldn't it be 44 and 176
On 6 August 2011 23:27, Nitin wrote:
> I am also getting 24 bytes but y it is taking it every data type as 8,8,8
> as if we take it alone it is 1 for char and 4 for int and 8 for doble as it
> is giving 24 which means it is setting every data type as 8 bytes.
>
it should be due to 64 bit machine
E(x)= 1 x (1/2) + 2 x (1/2 x 1/2 (Odd-Odd) + 1/2 x 1/2 (Even-Even) + 3 (1/4
x 1/2 (Odd-Odd-Even)+ 1/4 x 1/2 (Odd-Even-Odd)+ 1/4 x 1/2 (Even-Odd-Odd)+
1/4 x 1/2(Even-Even-Even) )+
E(x)= 1/2 + 1 + 3/2 .
According to me, since the series does not converge, Expectation value does
not exist.
@K
than we can make a make bit set for keep track. only require one bit per
character.
we can track 256 character by just 256/32 =8 integer . i think that is
sufficient for c language.
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to
how is that 49 bytes and 196 bytes
shouldn't it be 44 and 176 bytes respectively
On 6 August 2011 23:26, Ram Chauhan wrote:
> 1049 and 1098
>
> On Sat, Aug 6, 2011 at 11:09 PM, aditi garg wrote:
>
>> CHAR A[10][15] AND INT B[10][15] IS DEFINED
>> WHAT'S THE ADDRESS OF A[3][4] AND B[3][4]
>> IF A
given an array , find three numbers a,b and c such that a^2+b^2=c^2 in
o(n^2)
--
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
a
I think this is correct.
--
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/-/5gZRPfLAwNYJ.
To post to this group, send email to algogeeks@googlegroups.com.
To u
I have read that to avoid multiple declaration error we write #pragma
once in header files or use #ifndef and #def to make sure that the
header file is included only once...
i tried running a prog in whch i included stdio.h thrice bt it dint gv
any error...does dat mean we have #pragma once in ever
@sandeep
I have executed it on gcc, it's showing 16 bytes(earlier post, the address
too) ... I'm sure now, this thing is PURILY compiler dependent..
and it's your code buddy, not mine. ;)
On Sat, Aug 6, 2011 at 7:37 PM, SANDEEP CHUGH wrote:
>
> i hav executed ur code on dev c++.. i m getting c
I am also getting 24 bytes but y it is taking it every data type as 8,8,8 as
if we take it alone it is 1 for char and 4 for int and 8 for doble as it is
giving 24 which means it is setting every data type as 8 bytes.
On Sat, Aug 6, 2011 at 9:28 PM, Aditya Virmani wrote:
> i guess it depends on ur
error: stray ‘\342’ in program
--
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 op
1 - 100 of 306 matches
Mail list logo