Let,
min_dif=INT_MAX
1.Sort the N arrays A,B,C.
2.Find the minimum and maximum of A[0],B[0],C[0].
3.Take the difference between MAX-MIN values.
5.If the difference is less than min_dif then update min_dif and save all n
values.
6.Now increment the index of the array which contains minimum
We should return curr->next in the last statement of ur code
On Aug 18, 7:08 am, Dipankar Patro wrote:
> A slight change in above code:
> make it
> while(cur && cur->next)
> ^^ other wise the code will crash at last element in a prefect list, with no
> loop.
>
> On 18 August 2011 07:36, Dipankar
any suggestion on how to approach this problem ??
On Wed, Aug 17, 2011 at 10:37 PM, MAC wrote:
> Given n arrays, find n number such that sum of their differences is
> minimum. For e.g. if there are three arrays
>
> A = {4, 10, 15, 20}
> B = {1, 13, 29}
> C = {5, 14, 28}
>
> find three numbers
what is the difference between exit() and _exit
http://ideone.com/MCzGy
http://ideone.com/SxbwT
when i am using exit() hello world is printed but with _exit() nothing gets
printed though it ran successfully.plz explain why is so happening ??
--
Amol Sharma
Third Year Student
Computer Sci
+1 dipankar
it shud be undefined
i tried in dev cpp, the output is
3 3 3
--
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
alg
Interesting thing I came across:
http://stackoverflow.com/questions/1239938/c-accesses-an-array-out-of-bounds-gives-no-error-why
On 18 August 2011 09:39, vartika aggarwal wrote:
> Is it that there is no bounds checking in C while there is in C++ ?
>
>
> On Thu, Aug 18, 2011 at 9:27 AM, Dipankar P
Is it that there is no bounds checking in C while there is in C++ ?
On Thu, Aug 18, 2011 at 9:27 AM, Dipankar Patro wrote:
> Thats new..
> Its not working in C++, where as in C it works like a charm.
>
> On 18 August 2011 08:57, vartika aggarwal
> wrote:
>
>> @Aditi: That's because you haven
refer to this:
http://ideone.com/SRPTC
Shouldn't the answer be undefined behaviour?
In the program I am changing the value of a constant int and the result is
pretty amazing one.
PS: Question was asked in Atrenta written.
--
You received this message because you are subscribed to the Google Gr
Thats new..
Its not working in C++, where as in C it works like a charm.
On 18 August 2011 08:57, vartika aggarwal wrote:
> @Aditi: That's because you haven't changed the language to 'C' (while
> working on ideone. It doesn't give an error in C)
>
>
> On Thu, Aug 18, 2011 at 8:47 AM, aditi garg w
it will be max heap only.in which root denotes the largest number in
your set of 100 smallest
--
Amol Sharma
Third Year Student
Computer Science and Engineering
MNNIT Allahabad
On Thu, Aug 18, 2011 at 9:14 AM, aditi garg wrote:
> @ dave : i hv one doubt,we wud be maintaining a max or a m
@ dave : i hv one doubt,we wud be maintaining a max or a min heap??
On Thu, Aug 18, 2011 at 9:11 AM, aditi garg wrote:
> thank u so much dave :)
>
>
> On Thu, Aug 18, 2011 at 8:44 AM, Dave wrote:
>
>> @Aditi: Form a max-heap of the first 100 numbers. Then as you read the
>> remaining numbers, if
@Dave
How did you get the complexity as O(n log k)
On Aug 18, 8:14 am, Dave wrote:
> @Aditi: Form a max-heap of the first 100 numbers. Then as you read the
> remaining numbers, if a number is less than the root of the max-heap,
> replace the root with it and restore the heap condition. When you
thank u so much dave :)
On Thu, Aug 18, 2011 at 8:44 AM, Dave wrote:
> @Aditi: Form a max-heap of the first 100 numbers. Then as you read the
> remaining numbers, if a number is less than the root of the max-heap,
> replace the root with it and restore the heap condition. When you
> reach the en
@Aditi: That's because you haven't changed the language to 'C' (while
working on ideone. It doesn't give an error in C)
On Thu, Aug 18, 2011 at 8:47 AM, aditi garg wrote:
> @payal: im getting compile time errors fr both the strings...
> Chk dis :http://ideone.com/BRbkf
>
>
> On Thu, Aug 18, 2011
@payal: im getting compile time errors fr both the strings...
Chk dis :http://ideone.com/BRbkf
On Thu, Aug 18, 2011 at 4:12 AM, payal gupta wrote:
> i modified the code a lil bit
> #include
> #include
> int main()
> { clrscr();
> char arr[5] = "geeks";
> printf("%s\n", arr);
> char b[1]="t";
@Aditi: Form a max-heap of the first 100 numbers. Then as you read the
remaining numbers, if a number is less than the root of the max-heap,
replace the root with it and restore the heap condition. When you
reach the end of the million numbers, the heap will contain the
smallest 100 numbers.
If th
How to find the set of smallest 100 numbers out of 1 million numbers...
--
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+
How about using vertices and edges format in graphs?
- Traverse through each vertex in vertices list, and add all the edges to
the edge list if they are not already present in the edge list.
- Keep a counter to detect addition of new edges.
On 18 August 2011 01:31, Luciano Junior wrote:
> How ma
A slight change in above code:
make it
while(cur && cur->next)
^^ other wise the code will crash at last element in a prefect list, with no
loop.
On 18 August 2011 07:36, Dipankar Patro wrote:
> I have come up with this:
> - Use only one pointer, NODE *cur
> - initialize cur to headref
>
> - The
I have come up with this:
- Use only one pointer, NODE *cur
- initialize cur to headref
- The main loop:
while (cur)
{
if(cur->next->prev != cur)
break;
cur=cur->next;
}
return cur;
^^ I think the code is self explanatory. It just uses the fact that at loop,
the prev of next to current w
Using IPC functions
On Thu, Aug 18, 2011 at 1:03 AM, UTKARSH SRIVASTAV
wrote:
> is there a way to pass some variables which are shared by both parents and
> child and some which have different copies at the same time in fork
>
> --
> *UTKARSH SRIVASTAV
> CSE-3
> B-Tech 3rd Year
> @MNNIT ALLAH
divide absolute speeds by their GCD..and then the answer is their relative
speed..
VM
NSIT, Dwarka
3rd year, COE
On , Prakash D wrote:
any1??
On Sun, Aug 7, 2011 at 7:16 PM, Prakash D cegprak...@gmail.com> wrote:
yeah, i also need to know the approach for this kind of problems asked in
IT is the question..
You are given an N x N matrix with 0 and 1 values. You can swap any two
adjacent rows of the matrix.
Your goal is to have all the 1 values in the matrix below or on the main
diagonal. That is, for each X where 1 ≤ X ≤ N, there must be no 1 values in
row X
that are to the
Make an array of size n, and fill it with index of last 1 of corresponding
row in the matrix.. as if row 0 has 1101100 , than arr[0]=4 .
so we end up with an array containing last position of 1 in the respective
row..
lets arr[4] is like 3,2,2,1... we have to make it 1,2,2,3.. so now apply
fol
ys...i guess i misinterpreted..the question..
ma fault...
On Thu, Aug 18, 2011 at 4:27 AM, Brijesh Upadhyay <
brijeshupadhyay...@gmail.com> wrote:
> At the node from where the loop just started.. anyway we could not use that
> logic , coz it isnt circular linked list!
>
> --
> You received this m
At the node from where the loop just started.. anyway we could not use that
logic , coz it isnt circular linked list!
--
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/
WHERE will the back pointer of intersecting node will point?
On Wed, Aug 17, 2011 at 3:47 PM, Brijesh Upadhyay <
brijeshupadhyay...@gmail.com> wrote:
> But it is not circular doubly linked list.,..so u could not traverse in
> backward dirction from HEAD node..
>
> --
> You received this message b
But it is not circular doubly linked list.,..so u could not traverse in
backward dirction from HEAD node..
--
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/-/
i modified the code a lil bit
#include
#include
int main()
{ clrscr();
char arr[5] = "geeks";
printf("%s\n", arr);
char b[1]="t";
printf("%s\n",b);
getchar();
return 0;
}
the output in dis case is somewhat diff..cud someone explain...
On Thu, Aug 18, 2011 at 3:28 AM, Ayush Kapoor wrote:
>
http://www.spoj.pl/problems/HAROWS/
this is a spoj problem.. how to solve this problem??
--
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 e
any1??
On Sun, Aug 7, 2011 at 7:16 PM, Prakash D wrote:
> yeah, i also need to know the approach for this kind of problems asked in
> many places
>
>
> On Sun, Aug 7, 2011 at 3:58 PM, arvind kumar wrote:
>
>> Hi
>> Can any1 pls help me in solving this?
>> Two persons are running on a circular t
if we take 2 pointers initialized with the start node with one moving in
forward direction and other in backward direction and execute until both
point to same node .it cud be workin faster i suppose...
On Thu, Aug 18, 2011 at 1:21 AM, Piyush Sinha wrote:
> We all knw hw to find a loop in a singl
There is no null character in this string,as its length is 5 and the number
of characters is 5(Geeks),and printf("%s",arr) should output the string till
the null character
On Thu, Aug 18, 2011 at 2:40 AM, bihari wrote:
> upto null charchter..
>
> --
> You received this message becaus
upto null charchter..
--
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
How to prevent the compiler to alter the value of i in statement:
const int i=2;
Just give the idea about the implementation of const int i=somevalue;
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to algoge
I found it a bit tough..Can anyone suggest code for 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 group, send email to
algogeeks+unsubscr...@googl
How many different ways are there to count how many streets have in a city,
based on the city map?
What algorithms can be used for response this question ?
--
Luciano Soares Pinheiro Jr.
Analista desenvolvedor Sr.
--
You received this message because you
We all knw hw to find a loop in a singly linked list (Using hare and
tortoise method)..what if the linked list is a doubly linked list?can
we do it smthn better than hare n tortoise method using the advantage
of the doubly linked list?
--
*Piyush Sinha*
*IIIT, Allahabad*
*+91-7483122727*
*
is there a way to pass some variables which are shared by both parents and
child and some which have different copies at the same time in fork
--
*UTKARSH SRIVASTAV
CSE-3
B-Tech 3rd Year
@MNNIT ALLAHABAD*
--
You received this message because you are subscribed to the Google Groups
"Algorithm G
http://www.mediafire.com/?a2ia1j1i0q0pet1
--
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.
Are we assuming a flat earth?
On Aug 17, 9:13 am, priya ramesh
wrote:
> A moves 3 kms east from his starting point . He then travels 5 kms north.
> From that point he moves 8 kms to the east.How far is A from his starting
> point?
--
You received this message because you are subscribed to the
plz who have the pdf of this book plz mail it for algogeeks grp..
On Thu, Aug 18, 2011 at 12:10 AM, SANDEEP CHUGH wrote:
> mail to me too
>
> On Thu, Aug 18, 2011 at 12:04 AM, rajesh yerneni
> wrote:
>>
>> I could not download the file, please mail it to me tooo...
>>
>> --
>> You re
If the moves had been 3 km east, 5 km north, and 9 km east (instead of
8), the answer would have been 13.
Dave
On Aug 17, 9:25 am, priya ramesh
wrote:
> the answer is given as 13... even i got root(146)
--
You received this message because you are subscribed to the Google Groups
"Algorithm Ge
#include
int main()
{
char arr[5] = "geeks";
printf("%s", arr);
getchar();
return 0;
}
--
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, se
We know that n+m+s+carry < 10. So n<7. We also know that either n+n+n
or o+o+o > 9 because there must be a carry to make those two columns
add to a different value.
We can start eliminating values for n.
If n is 1, o would have to be 7 to make the second row work out. But
then u and e would both be
anybody who wrote on campus written test please put up the
questions.please help...
On Aug 17, 10:16 pm, MAC wrote:
> http://www.careercup.com/page?pid=emc-interview-questions
>
> this might help u :) best of luck
>
>
>
>
>
>
>
>
>
> On Wed, Aug 17, 2011 at 10:42 PM, htross wrote:
> > please
me too :P
On Thu, Aug 18, 2011 at 12:19 AM, Bhavani Pradeep wrote:
> oh yeah... just stopped thinking after finding one solution :P
>
> --
> 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
oh yeah... just stopped thinking after finding one solution :P
--
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.
2442
+1442
+5442
--
9326
2442
5442
1442
9326
-
other answers :)
--
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 emai
Im not able to think of any other answer other than this!!
--
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...@g
yup it's correct now :) :)
--
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 option
sorry earlier answer was wrong!!
4114
+5114
+0114
=9342
Assuming each alphabet has a unique digit
--
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 gr
@bhavani : i too got a similar answer :) I guess it has several answers!
--
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
mail to me too
On Thu, Aug 18, 2011 at 12:04 AM, rajesh yerneni wrote:
> I could not download the file, please mail it to me tooo...
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googl
4114
+2114
+0114
=6342
Just guess work!!
--
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
and of course y can't be '1'
On Thu, Aug 18, 2011 at 12:01 AM, rohit wrote:
> No third time he just say same digit are appearing but you write
> interchanging .
> correct me if i am wrong!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" grou
give one reason why i shouldnt ban you
On Wed, Aug 17, 2011 at 11:53 PM, priya ramesh <
love.for.programm...@gmail.com> wrote:
>noon
> + moon
> + soon
> = june
>
> find the values of the alphabets to satisfy this equation
>
> --
> You received this message because you are subscribed to the Go
I could not download the file, please mail it to me tooo...
--
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...@
No third time he just say same digit are appearing but you write
interchanging .
correct me if i am wrong!
--
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/-/
@sagar, aditya: +100 superb explaination!!
--
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.
@Douglas
nopes there is only one solution
here it is
*
See
answer is in the question
ques is saying that first there is 2 digit number
after 1 hour number interchanged
so let numbers be
xy
then yx
now third it is saying that both numbers are again repeating
and we also know that yx>xy and
noon
+ moon
+ soon
= june
find the values of the alphabets to satisfy this equation
--
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 emai
@rajul dave
45 miles per hour is uniform speed
On Wed, Aug 17, 2011 at 11:49 PM, rajul jain wrote:
> but its speed is uniform i think Don answer is right
>
>
> On Wed, Aug 17, 2011 at 11:42 PM, Douglas Diniz wrote:
>
>> There are infinite solutions with this logic, because the third
>> mileston
but its speed is uniform i think Don answer is right
On Wed, Aug 17, 2011 at 11:42 PM, Douglas Diniz wrote:
> There are infinite solutions with this logic, because the third
> milestone can have more than 2 digits.
>
> On Wed, Aug 17, 2011 at 3:08 PM, sagar pareek
> wrote:
> > @rajul
> >
> > 61
answer has to be sqrt(146) . 13 cant be the answer
On Wed, Aug 17, 2011 at 7:55 PM, priya ramesh <
love.for.programm...@gmail.com> wrote:
> the answer is given as 13... even i got root(146)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" gro
There are infinite solutions with this logic, because the third
milestone can have more than 2 digits.
On Wed, Aug 17, 2011 at 3:08 PM, sagar pareek wrote:
> @rajul
>
> 61-16 =45
>
> its not 55 miles per hour
>
> On Wed, Aug 17, 2011 at 11:33 PM, Don wrote:
>>
>> Actually you are all wrong. His
thnx for correcting me
On Wed, Aug 17, 2011 at 11:38 PM, sagar pareek wrote:
> @rajul
>
> 61-16 =45
>
> its not 55 miles per hour
>
>
> On Wed, Aug 17, 2011 at 11:33 PM, Don wrote:
>
>> Actually you are all wrong. His uniform speed was zero, and he was
>> sitting by milestone 44 the whole time.
For questions specifically asking about test cases, I would suggest
following 3 step approach:
First think of a* basic flow that MUST work for the application* (what is
expected with the application. Firstly make it clear with you interviewer).
eg:
1) User should be able to open Notepad w
@rajul
61-16 =45
its not 55 miles per hour
On Wed, Aug 17, 2011 at 11:33 PM, Don wrote:
> Actually you are all wrong. His uniform speed was zero, and he was
> sitting by milestone 44 the whole time.
>
> On Aug 17, 11:58 am, priya ramesh
> wrote:
> > A car is traveling at a uniform speed.The d
@sagar. Can you please explain how you got the solution? Is there any proper
math involved??
On Wed, Aug 17, 2011 at 10:35 PM, sagar pareek wrote:
> 16, 61, 106 average speed is 45 miles/hour
>
>
> On Wed, Aug 17, 2011 at 10:28 PM, priya ramesh <
> love.for.programm...@gmail.com> wrote:
>
>> A c
Actually you are all wrong. His uniform speed was zero, and he was
sitting by milestone 44 the whole time.
On Aug 17, 11:58 am, priya ramesh
wrote:
> A car is traveling at a uniform speed.The driver sees a milestone showing a
> 2-digit number. After traveling for an hour the driver sees another
>
what abou 16 , 61 , 116 so avg 55 m/hr
On Wed, Aug 17, 2011 at 10:35 PM, sagar pareek wrote:
> 16, 61, 106 average speed is 45 miles/hour
>
>
> On Wed, Aug 17, 2011 at 10:28 PM, priya ramesh <
> love.for.programm...@gmail.com> wrote:
>
>> A car is traveling at a uniform speed.The driver sees a m
+1 sagar pareek...
i used the following approach:
let the num be xy
so...
(10y + x) - (10x + y) is the distance travelled in 1 hr...
now, the the next milestone must be a three digit number, which can be of
following compostion: 1xy or xzy or yzx whr 0<=z<9 coz aif z=9, distance
travlled in tht hr
logic plz?
On Wed, Aug 17, 2011 at 10:35 PM, sagar pareek wrote:
> 16, 61, 106 average speed is 45 miles/hour
>
>
> On Wed, Aug 17, 2011 at 10:28 PM, priya ramesh <
> love.for.programm...@gmail.com> wrote:
>
>> A car is traveling at a uniform speed.The driver sees a milestone showing
>> a 2-digi
@Sagar: Could you please explain how you did it??
On Wed, Aug 17, 2011 at 10:35 PM, sagar pareek wrote:
> 16, 61, 106 average speed is 45 miles/hour
>
>
> On Wed, Aug 17, 2011 at 10:28 PM, priya ramesh <
> love.for.programm...@gmail.com> wrote:
>
>> A car is traveling at a uniform speed.The dri
Its both .. :)
On Wed, Aug 17, 2011 at 8:23 PM, tejaswini
wrote:
> what r da questions aked in written test??..i mean is it general aptitude
> test or technical based one
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To view th
http://www.careercup.com/page?pid=emc-interview-questions
this might help u :) best of luck
On Wed, Aug 17, 2011 at 10:42 PM, htross wrote:
> please reply soon anyone...times running out.
>
> On Aug 17, 7:54 pm, htross wrote:
> > hi everyone...what kind of questions will be asked in EMC fi
please reply soon anyone...times running out.
On Aug 17, 7:54 pm, htross wrote:
> hi everyone...what kind of questions will be asked in EMC first
> round???please help..
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to thi
Given n arrays, find n number such that sum of their differences is minimum.
For e.g. if there are three arrays
A = {4, 10, 15, 20}
B = {1, 13, 29}
C = {5, 14, 28}
find three numbers a, b, c such that |a-b| + |b-c| + |c-a| is minimum
where a E A , bEB , cEC
. Here the answer is a = 15, b = 13,
@priya ... which is your colg ?
On Aug 17, 10:01 pm, gaurav kumar wrote:
> any more questions plzz..gs is coming to ur colg on 23rd ...technical
> also ?
>
>
>
>
>
>
>
> > > Even i got 0.212
>
> > > *Muthuraj R
> > > IV th Year , ISE
> > > PESIT , Bangalore*
>
> > > On Wed, Aug 17, 2011 at 4:42 P
16, 61, 106 average speed is 45 miles/hour
On Wed, Aug 17, 2011 at 10:28 PM, priya ramesh <
love.for.programm...@gmail.com> wrote:
> A car is traveling at a uniform speed.The driver sees a milestone showing a
> 2-digit number. After traveling for an hour the driver sees another
> milestone with
any more questions plzz..gs is coming to ur colg on 23rd ...technical
also ?
> > Even i got 0.212
>
> > *Muthuraj R
> > IV th Year , ISE
> > PESIT , Bangalore*
>
> > On Wed, Aug 17, 2011 at 4:42 PM, Romil ... wrote:
>
> >> Kumar's approach would not do perhaps. I simply eliminated the undesir
_(n,1,n,0) is true if n is prime.
I set out to create an O(n^n) algorithm. It essentially computes the
product of every possible set of n integers in the range (1..n-1). If
any of those products equal n, the number is composite. You will
notice that the program does not use the * operator to perfo
A car is traveling at a uniform speed.The driver sees a milestone showing a
2-digit number. After traveling for an hour the driver sees another
milestone with the same digits in reverse order.After another hour the
driver sees another milestone containing the same two digits. What is the
average sp
No the warning in gcc is
ibm1.c: In function ‘main’:
ibm1.c:7:19: warning: initialization discards qualifiers from pointer target
type
On Wed, Aug 17, 2011 at 11:50 AM, venkat wrote:
> yes u r correct
>
> On Aug 16, 8:22 pm, Sanjay Rajpal wrote:
> > This is becuase "Hello" is a constant strin
search in this group itself .. there are gud questions with nice
explanations
On Aug 17, 7:27 pm, saurabh singh wrote:
> Kindly suggest some references on forkI know what it is and how it
> works.Its just that there are few programs related with recursion that
> I have to do using fork.I am
@Romil : what u r talking about is case of substring, check out the
problem again.
In substrings we need continuously, not in subsequences.
and I have said longest increasing subsequence, not longest common subsequence
On 8/17/11, Shiv Kumar Malik wrote:
> i think this can be solved by dynamic p
@dave : +1
On Wed, Aug 17, 2011 at 4:05 PM, Dave wrote:
> @Anika: You don't have to find the max and min elements of the entire
> array to find a row that doesn't contain either of them. If you scan 3
> rows, you will find a row that contains the max of those three rows,
> another that contains t
Please mail it to me also!!
On Aug 17, 2:22 pm, Sanjay Rajpal wrote:
> @Raman : mail kar de bhai abhi.
>
> Sanjay Kumar
> B.Tech Final Year
> Department of Computer Engineering
> National Institute of Technology Kurukshetra
> Kurukshetra - 136119
> Haryana, India
>
> On Wed, Aug 17, 2011 at 2:20
i guess if the option is provided it would have been an appropiate question
.
On Wed, Aug 17, 2011 at 6:02 PM, Rohit Srivastava wrote:
> +1 to nitin
>
>
> On Wed, Aug 17, 2011 at 6:02 PM, Romil ... wrote:
>
>> People this is not the way to approach this one. This question seems to be
>> unfai
Sure.
On Wed, Aug 17, 2011 at 4:33 PM, Nitin Nizhawan
wrote:
> @Gaurav , if you are able to find any resource that explains the logic of
> these algos, please let me know.
>
> On Sat, Aug 13, 2011 at 9:50 AM, Gaurav Menghani
> wrote:
>>
>> Thanks for the link. I was unaware of such algorithms. T
what is the starting position of knight.
--
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.
F
i think this can be solved by dynamic programming.
this is very similar to the knapsack problem.
1. We have to maximize profit by increasing the length of array.
2. principle of optimality also holds here.
considering the points solution ca be visualized easily.
--
You received this message be
Mutexes are used for synchronisation.
Basically they allow only one process to access any shared memory at a time
thus helping sync among processes.
On Wed, Aug 17, 2011 at 9:29 PM, Aman Kumar wrote:
> can we use mutex for synchronization?
>
> if yes why?
>
> --
> You received this message beca
can we use mutex for synchronization?
if yes why?
--
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...@googlegro
@Sanjay: In the longest common subsequence we have the continuous elements
but here he has placed no restriction on that..
On Wed, Aug 17, 2011 at 9:06 PM, Raghavan wrote:
> @sanjay:
>
> Thats cool
>
>
> On Wed, Aug 17, 2011 at 9:02 PM, Sanjay Rajpal wrote:
>
>> I think it is similar to longest
@sanjay:
Thats cool
On Wed, Aug 17, 2011 at 9:02 PM, Sanjay Rajpal wrote:
> I think it is similar to longest increasing subsequence problem .
> Try the following link :
> http://en.wikipedia.org/wiki/Longest_increasing_subsequence
>
> Sanjay Kumar
> B.Tech Final Year
> Department of Computer En
@Don : can you plz explain it ?
Sanjay Kumar
B.Tech Final Year
Department of Computer Engineering
National Institute of Technology Kurukshetra
Kurukshetra - 136119
Haryana, India
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to thi
I think it is similar to longest increasing subsequence problem .
Try the following link :
http://en.wikipedia.org/wiki/Longest_increasing_subsequence
Sanjay Kumar
B.Tech Final Year
Department of Computer Engineering
National Institute of Technology Kurukshetra
Kurukshetra - 136119
Haryana, India
I wrote it. Can you figure out how it works?
Don
On Aug 17, 1:25 am, Nitin Nizhawan wrote:
> Hi Dod,
>
> Could you pls expalin what this algorithm is doing and from where you got
> it.
>
> Thanks
> Nitin
>
> On Wed, Aug 17, 2011 at 2:56 AM, Don wrote:
> > I wrote a program to print prime numbe
1 - 100 of 181 matches
Mail list logo