[algogeeks] Help solving this problem

2015-11-27 Thread mohit choudhary
Given an undirected graph G = (V, E), for any subset of nodes S ⊆ V we can
construct a graph Gs from G by removing all nodes in S together with their
incident edges. In the critical node problem (CNP), we are given an integer
1 ≤ k ≤ |V | and need to find a subset S of size k such that the graph Gs
has the minimum pair-wise connectivity. Here pairwise connectivity of a
graph is defined as the number of pairs of connected vertices in the graph


*Input*: The file “cnp.in” includes multiples lines. The first line
contains three integers 1 ≤ n ≤ 1000, 1 ≤ m ≤ 10 and 1 ≤ k ≤ n that
correspond to the number of nodes, edges, and the size of S. Each of the
following m lines contain two integers u and v, separated by one space, to
denote an edge from u to v. Nodes are numbered from 1 to n.
*Output*: The file “cnp.out” contains exactly 2 lines. The first line
contains an integer P that is the minimum pairwise connectivity of GS. The
second line contains exactly k integers which are the id of the nodes in S.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to algogeeks+unsubscr...@googlegroups.com.


Re: [algogeeks] help with o/p why 0 comes???

2013-03-12 Thread vivekanandan r
The output of the below code is also zero ,
key reason is floating point number are stored as *mantissa, exponent. *

float dec=1.00;
printf("\n dec=%d , float =%f",dec,dec);



On Fri, Mar 1, 2013 at 12:05 PM, Karthikeyan V.B wrote:

> O/p will not be 0.
>
> 1.00 is the result which when read as %d takes the decimal value of
>  stored in memory - it will not be 1.00 or 0.
>
> Since float is not stored as direct binary in memory as integer is stored,
> instead there's a separate procedure for storing float as binary in memory
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to algogeeks+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to algogeeks+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [algogeeks] help with o/p why 0 comes???

2013-03-12 Thread Pratts
Hi Shubham,
This may be because your final data type you have chosen for your output
is float, n the one which you are trying to print is of int data type (i.e. %d).

Suggestion : Try changing %d to %f and see whether it works for you or not?


Thanks & Regards,

Pratts

On 01-Mar-2013, at 1:11, Shubham Sandeep  wrote:

> code snippet:
> int main()
> {
> printf ("%d\n",(float)((int)(3.5/2)));
> return 0;
> }
> 
> -- 
> Regards,
> SHUBHAM SANDEEP
> IT 3rd yr.
> NIT ALD.
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Algorithm Geeks" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to algogeeks+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to algogeeks+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[algogeeks] Help regarding Amazon Online Test ( OffCampus )

2013-03-12 Thread Raghav Garg
Hello All,
I need to know about amazon online test, has anyone given that?
How many and what type of questions they ask? Time period anything?

Thanking you

*Cheers
Raghav Garg
--
+91-9013201944*

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to algogeeks+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [algogeeks] help with o/p why 0 comes???

2013-03-04 Thread Anurag Sharma
Ya,  its looking like the problem of 'i686-apple-darwin11-llvm-gcc-4.2'.
For me as well it shows different outputs.

On Mon, Mar 4, 2013 at 4:45 PM, rohit jangid  wrote:

> yup , it is showing
> 0
> 0
>
> on ideone as well . so my gcc compiler
> is i686-apple-darwin11-llvm-gcc-4.2. that can be the reason . from here it
> appears 0 is just a coincidence and it depends on compiler implementation .
> C doesn't define any such behavior.
>
>
> On Mon, Mar 4, 2013 at 3:45 PM, Shubham Sandeep <
> s.shubhamsand...@gmail.com> wrote:
>
>> on my system every time o/p is 0
>> using ubuntu 10.04 ,gcc compiler
>>
>>
>> On Mon, Mar 4, 2013 at 7:34 AM, rohit jangid wrote:
>>
>>> output for me for the previous snippet
>>>
>>> localhost:slingshot rohitjangid$ ./a.out
>>> 1799476872
>>> 1799474584
>>> localhost:slingshot rohitjangid$ ./a.out
>>> 1710327432
>>> 1710325144
>>> localhost:slingshot rohitjangid$ ./a.out
>>> 1856128648
>>> 1856126360
>>> localhost:slingshot rohitjangid$ ./a.out
>>> 1724065416
>>> 1724063128
>>>
>>>
>>> On Mon, Mar 4, 2013 at 7:33 AM, rohit jangid wrote:
>>>
 yeah true . one interesting thing I noticed is that if you run this code

 #include
 int main()
 {
 int i = 0;
 do {
 printf ("%d\n",(float)1);
 }while(i++ < 1);
 return 0;
 }

 one would expect same output in both the rows but surprisingly it came
 different for me every time .
 any clues .. why ?




 On Fri, Mar 1, 2013 at 12:05 PM, Karthikeyan V.B 
 wrote:

> O/p will not be 0.
>
> 1.00 is the result which when read as %d takes the decimal value
> of  stored in memory - it will not be 1.00 or 0.
>
> Since float is not stored as direct binary in memory as integer is
> stored, instead there's a separate procedure for storing float as binary 
> in
> memory
>
> --
> You received this message because you are subscribed to the Google
> Groups "Algorithm Geeks" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to algogeeks+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



 --
 Rohit Jangid
 Graduate
 Deptt. of Computer Engineering
 NSIT, Delhi University, India


>>>
>>>
>>> --
>>> Rohit Jangid
>>> Graduate
>>> Deptt. of Computer Engineering
>>> NSIT, Delhi University, India
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Algorithm Geeks" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>
>>
>> --
>> Regards,
>> SHUBHAM SANDEEP
>> IT 3rd yr.
>> NIT ALD.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> Rohit Jangid
> Graduate
> Deptt. of Computer Engineering
> NSIT, Delhi University, India
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to algogeeks+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to algogeeks+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [algogeeks] help with o/p why 0 comes???

2013-03-04 Thread rohit jangid
yup , it is showing
0
0

on ideone as well . so my gcc compiler is i686-apple-darwin11-llvm-gcc-4.2.
that can be the reason . from here it appears 0 is just a coincidence and
it depends on compiler implementation . C doesn't define any such behavior.



On Mon, Mar 4, 2013 at 3:45 PM, Shubham Sandeep
wrote:

> on my system every time o/p is 0
> using ubuntu 10.04 ,gcc compiler
>
>
> On Mon, Mar 4, 2013 at 7:34 AM, rohit jangid wrote:
>
>> output for me for the previous snippet
>>
>> localhost:slingshot rohitjangid$ ./a.out
>> 1799476872
>> 1799474584
>> localhost:slingshot rohitjangid$ ./a.out
>> 1710327432
>> 1710325144
>> localhost:slingshot rohitjangid$ ./a.out
>> 1856128648
>> 1856126360
>> localhost:slingshot rohitjangid$ ./a.out
>> 1724065416
>> 1724063128
>>
>>
>> On Mon, Mar 4, 2013 at 7:33 AM, rohit jangid wrote:
>>
>>> yeah true . one interesting thing I noticed is that if you run this code
>>>
>>> #include
>>> int main()
>>> {
>>> int i = 0;
>>> do {
>>> printf ("%d\n",(float)1);
>>> }while(i++ < 1);
>>> return 0;
>>> }
>>>
>>> one would expect same output in both the rows but surprisingly it came
>>> different for me every time .
>>> any clues .. why ?
>>>
>>>
>>>
>>>
>>> On Fri, Mar 1, 2013 at 12:05 PM, Karthikeyan V.B wrote:
>>>
 O/p will not be 0.

 1.00 is the result which when read as %d takes the decimal value of
  stored in memory - it will not be 1.00 or 0.

 Since float is not stored as direct binary in memory as integer is
 stored, instead there's a separate procedure for storing float as binary in
 memory

 --
 You received this message because you are subscribed to the Google
 Groups "Algorithm Geeks" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to algogeeks+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.



>>>
>>>
>>>
>>> --
>>> Rohit Jangid
>>> Graduate
>>> Deptt. of Computer Engineering
>>> NSIT, Delhi University, India
>>>
>>>
>>
>>
>> --
>> Rohit Jangid
>> Graduate
>> Deptt. of Computer Engineering
>> NSIT, Delhi University, India
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> Regards,
> SHUBHAM SANDEEP
> IT 3rd yr.
> NIT ALD.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to algogeeks+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Rohit Jangid
Graduate
Deptt. of Computer Engineering
NSIT, Delhi University, India

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to algogeeks+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [algogeeks] help with o/p why 0 comes???

2013-03-04 Thread Shubham Sandeep
on my system every time o/p is 0
using ubuntu 10.04 ,gcc compiler

On Mon, Mar 4, 2013 at 7:34 AM, rohit jangid  wrote:

> output for me for the previous snippet
>
> localhost:slingshot rohitjangid$ ./a.out
> 1799476872
> 1799474584
> localhost:slingshot rohitjangid$ ./a.out
> 1710327432
> 1710325144
> localhost:slingshot rohitjangid$ ./a.out
> 1856128648
> 1856126360
> localhost:slingshot rohitjangid$ ./a.out
> 1724065416
> 1724063128
>
>
> On Mon, Mar 4, 2013 at 7:33 AM, rohit jangid wrote:
>
>> yeah true . one interesting thing I noticed is that if you run this code
>>
>> #include
>> int main()
>> {
>> int i = 0;
>> do {
>> printf ("%d\n",(float)1);
>> }while(i++ < 1);
>> return 0;
>> }
>>
>> one would expect same output in both the rows but surprisingly it came
>> different for me every time .
>> any clues .. why ?
>>
>>
>>
>>
>> On Fri, Mar 1, 2013 at 12:05 PM, Karthikeyan V.B wrote:
>>
>>> O/p will not be 0.
>>>
>>> 1.00 is the result which when read as %d takes the decimal value of
>>>  stored in memory - it will not be 1.00 or 0.
>>>
>>> Since float is not stored as direct binary in memory as integer is
>>> stored, instead there's a separate procedure for storing float as binary in
>>> memory
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Algorithm Geeks" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>
>>
>> --
>> Rohit Jangid
>> Graduate
>> Deptt. of Computer Engineering
>> NSIT, Delhi University, India
>>
>>
>
>
> --
> Rohit Jangid
> Graduate
> Deptt. of Computer Engineering
> NSIT, Delhi University, India
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to algogeeks+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Regards,
SHUBHAM SANDEEP
IT 3rd yr.
NIT ALD.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to algogeeks+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [algogeeks] help with o/p why 0 comes???

2013-03-03 Thread rohit jangid
output for me for the previous snippet

localhost:slingshot rohitjangid$ ./a.out
1799476872
1799474584
localhost:slingshot rohitjangid$ ./a.out
1710327432
1710325144
localhost:slingshot rohitjangid$ ./a.out
1856128648
1856126360
localhost:slingshot rohitjangid$ ./a.out
1724065416
1724063128


On Mon, Mar 4, 2013 at 7:33 AM, rohit jangid  wrote:

> yeah true . one interesting thing I noticed is that if you run this code
>
> #include
> int main()
> {
> int i = 0;
> do {
> printf ("%d\n",(float)1);
> }while(i++ < 1);
> return 0;
> }
>
> one would expect same output in both the rows but surprisingly it came
> different for me every time .
> any clues .. why ?
>
>
>
>
> On Fri, Mar 1, 2013 at 12:05 PM, Karthikeyan V.B wrote:
>
>> O/p will not be 0.
>>
>> 1.00 is the result which when read as %d takes the decimal value of
>>  stored in memory - it will not be 1.00 or 0.
>>
>> Since float is not stored as direct binary in memory as integer is
>> stored, instead there's a separate procedure for storing float as binary in
>> memory
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> Rohit Jangid
> Graduate
> Deptt. of Computer Engineering
> NSIT, Delhi University, India
>
>


-- 
Rohit Jangid
Graduate
Deptt. of Computer Engineering
NSIT, Delhi University, India

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to algogeeks+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [algogeeks] help with o/p why 0 comes???

2013-03-03 Thread rohit jangid
yeah true . one interesting thing I noticed is that if you run this code

#include
int main()
{
int i = 0;
do {
printf ("%d\n",(float)1);
}while(i++ < 1);
return 0;
}

one would expect same output in both the rows but surprisingly it came
different for me every time .
any clues .. why ?




On Fri, Mar 1, 2013 at 12:05 PM, Karthikeyan V.B wrote:

> O/p will not be 0.
>
> 1.00 is the result which when read as %d takes the decimal value of
>  stored in memory - it will not be 1.00 or 0.
>
> Since float is not stored as direct binary in memory as integer is stored,
> instead there's a separate procedure for storing float as binary in memory
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to algogeeks+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Rohit Jangid
Graduate
Deptt. of Computer Engineering
NSIT, Delhi University, India

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to algogeeks+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [algogeeks] help with o/p why 0 comes???

2013-02-28 Thread Karthikeyan V.B
O/p will not be 0.

1.00 is the result which when read as %d takes the decimal value of
 stored in memory - it will not be 1.00 or 0.

Since float is not stored as direct binary in memory as integer is stored,
instead there's a separate procedure for storing float as binary in memory

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to algogeeks+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [algogeeks] help with o/p why 0 comes???

2013-02-28 Thread Shubham Sandeep
thank you for pointing out that format was the key point.

On Fri, Mar 1, 2013 at 1:19 AM, gmagog...@gmail.com wrote:

> I think this is because of type mismatch. You are enforcing your program
> to read a floating point number in the way of reading a integer. And they
> have totally different format. If you have -Wall turned on, you should see
> a warning.
>
> Yanan Cao
>
>
> On Thu, Feb 28, 2013 at 1:41 PM, Shubham Sandeep <
> s.shubhamsand...@gmail.com> wrote:
>
>> code snippet:
>> *int main()
>> {
>> printf ("%d\n",(float)((int)(3.5/2)));
>> return 0;
>> }*
>>
>>
>> --
>> Regards,
>> SHUBHAM SANDEEP
>> IT 3rd yr.
>> NIT ALD.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to algogeeks+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Regards,
SHUBHAM SANDEEP
IT 3rd yr.
NIT ALD.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to algogeeks+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [algogeeks] help with o/p why 0 comes???

2013-02-28 Thread gmagog...@gmail.com
I think this is because of type mismatch. You are enforcing your program to
read a floating point number in the way of reading a integer. And they have
totally different format. If you have -Wall turned on, you should see a
warning.

Yanan Cao


On Thu, Feb 28, 2013 at 1:41 PM, Shubham Sandeep  wrote:

> code snippet:
> *int main()
> {
> printf ("%d\n",(float)((int)(3.5/2)));
> return 0;
> }*
>
> --
> Regards,
> SHUBHAM SANDEEP
> IT 3rd yr.
> NIT ALD.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to algogeeks+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to algogeeks+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[algogeeks] help with o/p why 0 comes???

2013-02-28 Thread Shubham Sandeep
code snippet:
*int main()
{
printf ("%d\n",(float)((int)(3.5/2)));
return 0;
}*

-- 
Regards,
SHUBHAM SANDEEP
IT 3rd yr.
NIT ALD.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to algogeeks+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [algogeeks] help to give DP solution

2012-09-17 Thread Tushar
www.ams.jhu.edu/~castello/362/Handouts/*hungarian*.pdf
This PDF  might be helpful


On Sunday, 16 September 2012 16:42:25 UTC+5:30, Rahul Kumar Patle wrote:
>
> @atul: in Hungarian Algorithms works for minimization of cost where the 
> terminating condition is based on zeros.. in my problem what value i will 
> have to consider as base/terminating values because there may not be same 
> values in coloumn and rows..
> second thing you use subtraction there, here will i have to use 
> addition..??
> please clarify..
> i have seen following link:
> http://s-mat-pcs.oulu.fi/~mpa/matreng/eem1_2-1.htm
> if you have link which explains maximization problem..
> please post here..
>
> On Sun, Sep 16, 2012 at 12:44 AM, atul anand 
> > wrote:
>
>> correct me if i am wrong ,
>> it seems similar to Hungarian algorithm.
>> here each column can be considered as persons P(p0,p1,p2,..pn) and each 
>> as cost of job say X(x0,x1,x2,x3,x4xn).
>>  Hungarian algorithm tells how to find minimal but here its maximal...so 
>> i guess changes in the algo will give the outputl
>>
>> On Sat, Sep 15, 2012 at 9:10 PM, Rahul Kumar Patle 
>> 
>> > wrote:
>>
>>> A 2D array of order A[N][N] is given, considering entry A[i][i] as 
>>> invalid you have to select one element from each row such that
>>> 1. Selected elements does not belong to same column.
>>> 2. Sum of selected element has maximal.
>>>
>>>
>>> -- 
>>> Thanks and Regards:
>>> Rahul Kumar 
>>> Patle
>>> M.Tech, School of Information Technology
>>> Indian Institute of Technology, Kharagpur-721302, 
>>> India
>>> Mobile No: +91-8798049298, +91-9424738542
>>> Alternate Email: rahulku...@hotmail.com 
>>>
>>>  -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Algorithm Geeks" group.
>>> To post to this group, send email to algo...@googlegroups.com
>>> .
>>> To unsubscribe from this group, send email to 
>>> algogeeks+...@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 algo...@googlegroups.com
>> .
>> To unsubscribe from this group, send email to 
>> algogeeks+...@googlegroups.com .
>> For more options, visit this group at 
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> -- 
> Thanks and Regards:
> Rahul Kumar 
> Patle
> M.Tech, School of Information Technology
> Indian Institute of Technology, Kharagpur-721302, 
> India
> Mobile No: +91-8798049298, +91-9424738542
> Alternate Email: rahulku...@hotmail.com 
>
>

-- 
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/-/p2mOfKSQbrUJ.
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] help to give DP solution

2012-09-16 Thread atul anand
typo error :-
mat[ i ] [ j ] to -ve sign and make mat[ i ][ i ]=INT_MAX

On Mon, Sep 17, 2012 at 9:43 AM, atul anand  wrote:

> make all mat[i][j] to -ve sign and make mat[i][j]=INT_MAX
> now i guess same algo will work..no changes required.
>
>
> On Sun, Sep 16, 2012 at 4:42 PM, Rahul Kumar Patle <
> patlerahulku...@gmail.com> wrote:
>
>> @atul: in Hungarian Algorithms works for minimization of cost where the
>> terminating condition is based on zeros.. in my problem what value i will
>> have to consider as base/terminating values because there may not be same
>> values in coloumn and rows..
>> second thing you use subtraction there, here will i have to use
>> addition..??
>> please clarify..
>> i have seen following link:
>> http://s-mat-pcs.oulu.fi/~mpa/matreng/eem1_2-1.htm
>> if you have link which explains maximization problem..
>> please post here..
>>
>> On Sun, Sep 16, 2012 at 12:44 AM, atul anand wrote:
>>
>>> correct me if i am wrong ,
>>> it seems similar to Hungarian algorithm.
>>> here each column can be considered as persons P(p0,p1,p2,..pn) and each
>>> as cost of job say X(x0,x1,x2,x3,x4xn).
>>>  Hungarian algorithm tells how to find minimal but here its maximal...so
>>> i guess changes in the algo will give the outputl
>>>
>>> On Sat, Sep 15, 2012 at 9:10 PM, Rahul Kumar Patle <
>>> patlerahulku...@gmail.com> wrote:
>>>
 A 2D array of order A[N][N] is given, considering entry A[i][i] as
 invalid you have to select one element from each row such that
 1. Selected elements does not belong to same column.
 2. Sum of selected element has maximal.


 --
 Thanks and Regards:
 Rahul Kumar 
 Patle
 M.Tech, School of Information Technology
 Indian Institute of Technology, Kharagpur-721302, 
 India
 Mobile No: +91-8798049298, +91-9424738542
 Alternate Email: rahulkumarpa...@hotmail.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.
>>>
>>
>>
>>
>> --
>> Thanks and Regards:
>> Rahul Kumar 
>> Patle
>> M.Tech, School of Information Technology
>> Indian Institute of Technology, Kharagpur-721302, 
>> India
>> Mobile No: +91-8798049298, +91-9424738542
>> Alternate Email: rahulkumarpa...@hotmail.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.



Re: [algogeeks] help to give DP solution

2012-09-16 Thread atul anand
make all mat[i][j] to -ve sign and make mat[i][j]=INT_MAX
now i guess same algo will work..no changes required.

On Sun, Sep 16, 2012 at 4:42 PM, Rahul Kumar Patle <
patlerahulku...@gmail.com> wrote:

> @atul: in Hungarian Algorithms works for minimization of cost where the
> terminating condition is based on zeros.. in my problem what value i will
> have to consider as base/terminating values because there may not be same
> values in coloumn and rows..
> second thing you use subtraction there, here will i have to use
> addition..??
> please clarify..
> i have seen following link:
> http://s-mat-pcs.oulu.fi/~mpa/matreng/eem1_2-1.htm
> if you have link which explains maximization problem..
> please post here..
>
> On Sun, Sep 16, 2012 at 12:44 AM, atul anand wrote:
>
>> correct me if i am wrong ,
>> it seems similar to Hungarian algorithm.
>> here each column can be considered as persons P(p0,p1,p2,..pn) and each
>> as cost of job say X(x0,x1,x2,x3,x4xn).
>>  Hungarian algorithm tells how to find minimal but here its maximal...so
>> i guess changes in the algo will give the outputl
>>
>> On Sat, Sep 15, 2012 at 9:10 PM, Rahul Kumar Patle <
>> patlerahulku...@gmail.com> wrote:
>>
>>> A 2D array of order A[N][N] is given, considering entry A[i][i] as
>>> invalid you have to select one element from each row such that
>>> 1. Selected elements does not belong to same column.
>>> 2. Sum of selected element has maximal.
>>>
>>>
>>> --
>>> Thanks and Regards:
>>> Rahul Kumar 
>>> Patle
>>> M.Tech, School of Information Technology
>>> Indian Institute of Technology, Kharagpur-721302, 
>>> India
>>> Mobile No: +91-8798049298, +91-9424738542
>>> Alternate Email: rahulkumarpa...@hotmail.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.
>>
>
>
>
> --
> Thanks and Regards:
> Rahul Kumar 
> Patle
> M.Tech, School of Information Technology
> Indian Institute of Technology, Kharagpur-721302, 
> India
> Mobile No: +91-8798049298, +91-9424738542
> Alternate Email: rahulkumarpa...@hotmail.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.



Re: [algogeeks] help to give DP solution

2012-09-16 Thread Rahul Kumar Patle
@atul: in Hungarian Algorithms works for minimization of cost where the
terminating condition is based on zeros.. in my problem what value i will
have to consider as base/terminating values because there may not be same
values in coloumn and rows..
second thing you use subtraction there, here will i have to use addition..??
please clarify..
i have seen following link:
http://s-mat-pcs.oulu.fi/~mpa/matreng/eem1_2-1.htm
if you have link which explains maximization problem..
please post here..

On Sun, Sep 16, 2012 at 12:44 AM, atul anand wrote:

> correct me if i am wrong ,
> it seems similar to Hungarian algorithm.
> here each column can be considered as persons P(p0,p1,p2,..pn) and each as
> cost of job say X(x0,x1,x2,x3,x4xn).
>  Hungarian algorithm tells how to find minimal but here its maximal...so i
> guess changes in the algo will give the outputl
>
> On Sat, Sep 15, 2012 at 9:10 PM, Rahul Kumar Patle <
> patlerahulku...@gmail.com> wrote:
>
>> A 2D array of order A[N][N] is given, considering entry A[i][i] as
>> invalid you have to select one element from each row such that
>> 1. Selected elements does not belong to same column.
>> 2. Sum of selected element has maximal.
>>
>>
>> --
>> Thanks and Regards:
>> Rahul Kumar 
>> Patle
>> M.Tech, School of Information Technology
>> Indian Institute of Technology, Kharagpur-721302, 
>> India
>> Mobile No: +91-8798049298, +91-9424738542
>> Alternate Email: rahulkumarpa...@hotmail.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.
>



-- 
Thanks and Regards:
Rahul Kumar Patle
M.Tech, School of Information Technology
Indian Institute of Technology, Kharagpur-721302,
India
Mobile No: +91-8798049298, +91-9424738542
Alternate Email: rahulkumarpa...@hotmail.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.



Re: [algogeeks] help to give DP solution

2012-09-16 Thread atul anand
@tushar :- correct...

On Sun, Sep 16, 2012 at 12:59 PM, Tushar  wrote:

> we can assign minimum possible value, like negative infinity to the
> diagonal elements.
> Then they would not be considered for maximizing the sum.
>
>  --
> 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/-/iQtl7QGJBFwJ.
>
> 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] help to give DP solution

2012-09-16 Thread Tushar
we can assign minimum possible value, like negative infinity to the 
diagonal elements.
Then they would not be considered for maximizing the sum.

-- 
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/-/iQtl7QGJBFwJ.
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] help to give DP solution

2012-09-15 Thread Ravi Ranjan
@atul

agreed with u dat it can be solved through hungarian method.. but what
about the condition a[i][i] entry is invalid
if all elements lie on diagonal n d sum is also maximum den a[i][i]
condition will be violated but Hungarian method still works

-- 
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] help to give DP solution

2012-09-15 Thread atul anand
typo error :-
and each *row* *as cost

On Sun, Sep 16, 2012 at 12:44 AM, atul anand wrote:

> correct me if i am wrong ,
> it seems similar to Hungarian algorithm.
> here each column can be considered as persons P(p0,p1,p2,..pn) and each as
> cost of job say X(x0,x1,x2,x3,x4xn).
>  Hungarian algorithm tells how to find minimal but here its maximal...so i
> guess changes in the algo will give the outputl
>
>
> On Sat, Sep 15, 2012 at 9:10 PM, Rahul Kumar Patle <
> patlerahulku...@gmail.com> wrote:
>
>> A 2D array of order A[N][N] is given, considering entry A[i][i] as
>> invalid you have to select one element from each row such that
>> 1. Selected elements does not belong to same column.
>> 2. Sum of selected element has maximal.
>>
>>
>> --
>> Thanks and Regards:
>> Rahul Kumar 
>> Patle
>> M.Tech, School of Information Technology
>> Indian Institute of Technology, Kharagpur-721302, 
>> India
>> Mobile No: +91-8798049298, +91-9424738542
>> Alternate Email: rahulkumarpa...@hotmail.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.



Re: [algogeeks] help to give DP solution

2012-09-15 Thread atul anand
correct me if i am wrong ,
it seems similar to Hungarian algorithm.
here each column can be considered as persons P(p0,p1,p2,..pn) and each as
cost of job say X(x0,x1,x2,x3,x4xn).
 Hungarian algorithm tells how to find minimal but here its maximal...so i
guess changes in the algo will give the outputl

On Sat, Sep 15, 2012 at 9:10 PM, Rahul Kumar Patle <
patlerahulku...@gmail.com> wrote:

> A 2D array of order A[N][N] is given, considering entry A[i][i] as invalid
> you have to select one element from each row such that
> 1. Selected elements does not belong to same column.
> 2. Sum of selected element has maximal.
>
>
> --
> Thanks and Regards:
> Rahul Kumar 
> Patle
> M.Tech, School of Information Technology
> Indian Institute of Technology, Kharagpur-721302, 
> India
> Mobile No: +91-8798049298, +91-9424738542
> Alternate Email: rahulkumarpa...@hotmail.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.



[algogeeks] help to give DP solution

2012-09-15 Thread Rahul Kumar Patle
A 2D array of order A[N][N] is given, considering entry A[i][i] as invalid
you have to select one element from each row such that
1. Selected elements does not belong to same column.
2. Sum of selected element has maximal.


-- 
Thanks and Regards:
Rahul Kumar Patle
M.Tech, School of Information Technology
Indian Institute of Technology, Kharagpur-721302,
India
Mobile No: +91-8798049298, +91-9424738542
Alternate Email: rahulkumarpa...@hotmail.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.



[algogeeks] Help need: online Amazon Test

2012-09-07 Thread coolfrog$
any one given Amzon online test recently?
Plz share quetions and interview experience.

Thanks in advance.

-- 
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] Help for Indus Valley partners!

2012-07-27 Thread s_m154
Can you please tell the kind of algos that will be asked for the interview 
and what all subjects to focus for?

-- 
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/-/vCR90sqfDDMJ.
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] Help woth LISP

2012-07-08 Thread Victor Manuel Grijalva Altamirano
The next solve the problem of eight Queeen... but i don't undestand
it!!! can you explain me?

(defun n-queens (n m)
  (

if (= n 1)
(loop for x from 1 to m collect (list x))


(loop for sol in (n-queens (1- n) m) nconc
  (loop for col from 1 to m when
(loop for row from 0 to (length sol) for c in sol
  always (and (/= col c)
  (/= (abs (- c col)) (1+ row)))
  finally (return (cons col sol))
)
   collect it
  )
 )
)
 )




-- 
Victor Manuel Grijalva Altamirano
Universidad Tecnologica de La Mixteca

-- 
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] Help about compile in LISP

2012-07-07 Thread Victor Manuel Grijalva Altamirano
I understand the idea of backtracking(eight queen it´s the classsic
problem), i´m programmer of C,C++, JAVA,...
I'm learning LISP, i know a bit about funtions, operators, etc...

I want compile the code and throw me the solution, but i have problem to do
that!!!


2012/7/7 Abhishek Sharma 

> whats your purpose behind that ??
>
> a) u want to understand the algorithm ? then go through backtracking and
> then try to solve the problem
> b) u want to learn LISP ?? then this is not the right place... u may want
> to go through LIPS tutorials and then have a look at at this problem again
>
>
> On Sun, Jul 8, 2012 at 12:15 AM, Victor Manuel Grijalva Altamirano <
> kavic1.mar...@gmail.com> wrote:
>
>> The next code, it's about the problem Eight Queens, i found it in
>> internet, but i'm new in LISP and i don´t know how to compile it...
>> Can you help me?
>>
>> (defun find-queen (arr p d)
>>   (destructuring-bind ((px py) (dx dy)) (list p d)
>> (do ((x px (+ x dx))
>>  (y py (+ y dy)))
>> ((not (array-in-bounds-p arr x y)))
>>   (when (= (aref arr x y) 1) (return t)
>>
>> (defun queen-in-row (board row)
>>   (find-queen board (list row 0) '(0 1)))
>>
>> (defun queen-in-col (board col)
>>   (find-queen board (list 0 col) '(1 0) ))
>>
>> (defun queen-in-diags (board x y)
>>   (member t (mapcar (lambda (p)
>> (find-queen board (list x y) p))
>>   '((1 1) (-1 -1) (1 -1) (-1 1)
>>
>> (defun queen-in-range (board x y)
>>   (or (queen-in-row board x)
>>   (queen-in-col board y)
>>   (queen-in-diags board x y)))
>>
>> (defun backtracking (pred explore node)
>>   (if (funcall pred node) (list node)
>> (mapcan (lambda (n) (backtracking pred explore n))
>> (funcall explore node
>>
>> (defun count-queens (board)
>>   (loop for i below (array-total-size board)
>> for box = (row-major-aref board i)
>> count (> box 0)))
>>
>> (defun solutionp (board)
>>   (and board (= 8 (count-queens board
>>
>> (defun put-queens (board)
>>   (loop for i below 8
>> when (not (queen-in-row board i))
>> return
>> (loop for j below 8
>>   for b = (copy-array board)
>>   when (not (queen-in-range board i j))
>>do (setf (aref b i j) 1)
>>and collect b)))
>>
>> (defun 8-queens ()
>>   (backtracking #'solutionp #'put-queens board))
>>
>> (defvar board (make-array '(8 8) :initial-element 0))
>>
>>
>> --
>> Victor Manuel Grijalva Altamirano
>> Universidad Tecnologica de La Mixteca
>>
>> --
>> 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.
>



-- 
Victor Manuel Grijalva Altamirano
Universidad Tecnologica de La Mixteca

-- 
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] Help about compile in LISP

2012-07-07 Thread Abhishek Sharma
whats your purpose behind that ??

a) u want to understand the algorithm ? then go through backtracking and
then try to solve the problem
b) u want to learn LISP ?? then this is not the right place... u may want
to go through LIPS tutorials and then have a look at at this problem again


On Sun, Jul 8, 2012 at 12:15 AM, Victor Manuel Grijalva Altamirano <
kavic1.mar...@gmail.com> wrote:

> The next code, it's about the problem Eight Queens, i found it in
> internet, but i'm new in LISP and i don´t know how to compile it...
> Can you help me?
>
> (defun find-queen (arr p d)
>   (destructuring-bind ((px py) (dx dy)) (list p d)
> (do ((x px (+ x dx))
>  (y py (+ y dy)))
> ((not (array-in-bounds-p arr x y)))
>   (when (= (aref arr x y) 1) (return t)
>
> (defun queen-in-row (board row)
>   (find-queen board (list row 0) '(0 1)))
>
> (defun queen-in-col (board col)
>   (find-queen board (list 0 col) '(1 0) ))
>
> (defun queen-in-diags (board x y)
>   (member t (mapcar (lambda (p)
> (find-queen board (list x y) p))
>   '((1 1) (-1 -1) (1 -1) (-1 1)
>
> (defun queen-in-range (board x y)
>   (or (queen-in-row board x)
>   (queen-in-col board y)
>   (queen-in-diags board x y)))
>
> (defun backtracking (pred explore node)
>   (if (funcall pred node) (list node)
> (mapcan (lambda (n) (backtracking pred explore n))
> (funcall explore node
>
> (defun count-queens (board)
>   (loop for i below (array-total-size board)
> for box = (row-major-aref board i)
> count (> box 0)))
>
> (defun solutionp (board)
>   (and board (= 8 (count-queens board
>
> (defun put-queens (board)
>   (loop for i below 8
> when (not (queen-in-row board i))
> return
> (loop for j below 8
>   for b = (copy-array board)
>   when (not (queen-in-range board i j))
>do (setf (aref b i j) 1)
>and collect b)))
>
> (defun 8-queens ()
>   (backtracking #'solutionp #'put-queens board))
>
> (defvar board (make-array '(8 8) :initial-element 0))
>
>
> --
> Victor Manuel Grijalva Altamirano
> Universidad Tecnologica de La Mixteca
>
> --
> 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] Help about compile in LISP

2012-07-07 Thread Victor Manuel Grijalva Altamirano
The next code, it's about the problem Eight Queens, i found it in internet,
but i'm new in LISP and i don´t know how to compile it...
Can you help me?

(defun find-queen (arr p d)
  (destructuring-bind ((px py) (dx dy)) (list p d)
(do ((x px (+ x dx))
 (y py (+ y dy)))
((not (array-in-bounds-p arr x y)))
  (when (= (aref arr x y) 1) (return t)

(defun queen-in-row (board row)
  (find-queen board (list row 0) '(0 1)))

(defun queen-in-col (board col)
  (find-queen board (list 0 col) '(1 0) ))

(defun queen-in-diags (board x y)
  (member t (mapcar (lambda (p)
(find-queen board (list x y) p))
  '((1 1) (-1 -1) (1 -1) (-1 1)

(defun queen-in-range (board x y)
  (or (queen-in-row board x)
  (queen-in-col board y)
  (queen-in-diags board x y)))

(defun backtracking (pred explore node)
  (if (funcall pred node) (list node)
(mapcan (lambda (n) (backtracking pred explore n))
(funcall explore node

(defun count-queens (board)
  (loop for i below (array-total-size board)
for box = (row-major-aref board i)
count (> box 0)))

(defun solutionp (board)
  (and board (= 8 (count-queens board

(defun put-queens (board)
  (loop for i below 8
when (not (queen-in-row board i))
return
(loop for j below 8
  for b = (copy-array board)
  when (not (queen-in-range board i j))
   do (setf (aref b i j) 1)
   and collect b)))

(defun 8-queens ()
  (backtracking #'solutionp #'put-queens board))

(defvar board (make-array '(8 8) :initial-element 0))


-- 
Victor Manuel Grijalva Altamirano
Universidad Tecnologica de La Mixteca

-- 
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] Help needed for telephonic interview from Amazon banglore.

2012-06-30 Thread Vikas
Hi I have one year experience and have interview scheduled on monday.
Pease help me with your experience or knowledge regarding questions, 
strategy and
any misc aspect.

Thanks in advance 

-- 
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/-/wmSwLUDkhY8J.
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] help

2011-10-05 Thread SHUBHAM BANSAL
can anybody tell me about INFOEDGE working culture?

--
Shubham bansal
contact no. 7206338328
NIT Kurukshetra
Computer Engineering
(Final year)

-- 
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] Help sourcebit !!!

2011-10-05 Thread praveen raj
Plz put the technical written paper pattern ...of sourcebit... and some
sample papers...of what type of questions(level) would be asked...

-- 
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] help help

2011-09-28 Thread abhishek iyer
http://www.fileserve.com/file/eBgSThF/How%20To%20Prepare%20For%20Qt%20Apt%20For%20Cat%202E%20By%20Sharma.pdf


On Tue, Sep 27, 2011 at 4:23 AM, SHUBHAM BANSAL
wrote:

> If anyone have E-book of "Quantative Aptitude For CAT by Arun Sharma".??
> Then kindly send to my email.or send me link if any 1 hav..Shubham
> bansal
> contact no. 7206338328
> NIT Kurukshetra
> Computer Engineering
> (Final year)
>
>  --
> 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.
>



-- 
Thanks & Regards
Abhishek Iyer

"If You Obey All the Rules, You Will Miss All the Fun. "

-- 
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] help nedded

2011-09-24 Thread Kunal Yadav
2nd
#include
#include
using namespace std;
int  main()
{
string s;
cin>>s;
int i=0,count=1;
vector no;
vector c;
while(s[i]!='\0')
{
if(s[i]==s[i+1])
count++;
else
{
c.push_back(s[i]);
no.push_back(count);
count=1;
}
i++;
}
for(i=0;i wrote:

> for 1st
> #include
> #include
>
> using namespace std;
> int  main()
> {
> char c;
> string s;
> int n;
> vector  ans;
> cin>>s;
> int i=0;
> while(s[i]!='\0')
> {
> c=s[i];
> n=s[i+1]-'0';
> while(n--)
> ans.push_back(c);
> i+=2;
> }
> for(i=0;i cout< return 0;
> }
>
>
> On Thu, Sep 22, 2011 at 3:46 PM, Dheeraj Sharma <
> dheerajsharma1...@gmail.com> wrote:
>
>> for 1st
>>
>> #include
>> #include
>> #include
>>
>> using namespace std;
>> int main()
>> {
>> char str[100];
>> cin>>str;
>> int len=strlen(str);
>> int i=1;
>> while(i> {
>> int x=str[i]-48;
>> while(x--)
>> cout<> i+=2;
>> }
>>  getch();
>>
>> }
>>
>>
>> On Thu, Sep 22, 2011 at 3:42 PM, Dheeraj Sharma <
>> dheerajsharma1...@gmail.com> wrote:
>>
>>> for 2nd one
>>> #include
>>> #include
>>> using namespace std;
>>> int main()
>>> {
>>> char str[100];
>>> cin>>str;
>>>
>>> char ch=str[0];
>>> int count=0,i=0;
>>> while(str[i])
>>> {
>>>  if(str[i]==ch)
>>>  count++;
>>>  else
>>>  {
>>>  cout<>>  ch=str[i];
>>>  count=1;
>>>  }
>>>  i++;
>>>  }
>>>  cout<>>  getch();
>>>
>>> }
>>>
>>>
>>> On Thu, Sep 22, 2011 at 11:58 AM, rahul sharma 
>>> wrote:
>>>
 i found a question of ms earlier but know i not able to find
 it.plz post link or thread 


 i/p::a3b2c4:
 o/p:aaabb

 i/p:aaabbc
 o/p:a3b2c1

 --
 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.


>>>
>>>
>>> --
>>> *Dheeraj Sharma*
>>> Comp Engg.
>>> NIT Kurukshetra
>>>
>>>
>>>
>>
>>
>> --
>> *Dheeraj Sharma*
>> Comp Engg.
>> NIT Kurukshetra
>>
>>
>>  --
>> 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
> Kunal Yadav
> (http://sourcebit.in)
>
>


-- 
Regards
Kunal Yadav
(http://sourcebit.in)

-- 
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] help nedded

2011-09-24 Thread Kunal Yadav
for 1st
#include
#include
using namespace std;
int  main()
{
char c;
string s;
int n;
vector  ans;
cin>>s;
int i=0;
while(s[i]!='\0')
{
c=s[i];
n=s[i+1]-'0';
while(n--)
ans.push_back(c);
i+=2;
}
for(i=0;i wrote:

> for 1st
>
> #include
> #include
> #include
>
> using namespace std;
> int main()
> {
> char str[100];
> cin>>str;
> int len=strlen(str);
> int i=1;
> while(i {
> int x=str[i]-48;
> while(x--)
> cout< i+=2;
> }
>  getch();
>
> }
>
>
> On Thu, Sep 22, 2011 at 3:42 PM, Dheeraj Sharma <
> dheerajsharma1...@gmail.com> wrote:
>
>> for 2nd one
>> #include
>> #include
>> using namespace std;
>> int main()
>> {
>> char str[100];
>> cin>>str;
>>
>> char ch=str[0];
>> int count=0,i=0;
>> while(str[i])
>> {
>>  if(str[i]==ch)
>>  count++;
>>  else
>>  {
>>  cout<>  ch=str[i];
>>  count=1;
>>  }
>>  i++;
>>  }
>>  cout<>  getch();
>>
>> }
>>
>>
>> On Thu, Sep 22, 2011 at 11:58 AM, rahul sharma 
>> wrote:
>>
>>> i found a question of ms earlier but know i not able to find
>>> it.plz post link or thread 
>>>
>>>
>>> i/p::a3b2c4:
>>> o/p:aaabb
>>>
>>> i/p:aaabbc
>>> o/p:a3b2c1
>>>
>>> --
>>> 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.
>>>
>>>
>>
>>
>> --
>> *Dheeraj Sharma*
>> Comp Engg.
>> NIT Kurukshetra
>>
>>
>>
>
>
> --
> *Dheeraj Sharma*
> Comp Engg.
> NIT Kurukshetra
>
>
>  --
> 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
Kunal Yadav
(http://sourcebit.in)

-- 
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] Help for Pep Exam

2011-09-22 Thread Suganya
Can anyone tell me some suggestions to prepare for Pep exam...?

-- 
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] help nedded

2011-09-22 Thread Dheeraj Sharma
for 1st
#include
#include
#include
using namespace std;
int main()
{
char str[100];
cin>>str;
int len=strlen(str);
int i=1;
while(i wrote:

> for 2nd one
> #include
> #include
> using namespace std;
> int main()
> {
> char str[100];
> cin>>str;
>
> char ch=str[0];
> int count=0,i=0;
> while(str[i])
> {
>  if(str[i]==ch)
>  count++;
>  else
>  {
>  cout<  ch=str[i];
>  count=1;
>  }
>  i++;
>  }
>  cout<  getch();
>
> }
>
>
> On Thu, Sep 22, 2011 at 11:58 AM, rahul sharma wrote:
>
>> i found a question of ms earlier but know i not able to find
>> it.plz post link or thread 
>>
>>
>> i/p::a3b2c4:
>> o/p:aaabb
>>
>> i/p:aaabbc
>> o/p:a3b2c1
>>
>> --
>> 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.
>>
>>
>
>
> --
> *Dheeraj Sharma*
> Comp Engg.
> NIT Kurukshetra
>
>
>


-- 
*Dheeraj Sharma*
Comp Engg.
NIT Kurukshetra

-- 
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] help nedded

2011-09-22 Thread Dheeraj Sharma
for 2nd one
#include
#include
using namespace std;
int main()
{
char str[100];
cin>>str;

char ch=str[0];
int count=0,i=0;
while(str[i])
{
 if(str[i]==ch)
 count++;
 else
 {
 cout i found a question of ms earlier but know i not able to find
> it.plz post link or thread 
>
>
> i/p::a3b2c4:
> o/p:aaabb
>
> i/p:aaabbc
> o/p:a3b2c1
>
> --
> 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.
>
>


-- 
*Dheeraj Sharma*
Comp Engg.
NIT Kurukshetra

-- 
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] help nedded

2011-09-21 Thread rahul sharma
i found a question of ms earlier but know i not able to find
it.plz post link or thread 


i/p::a3b2c4:
o/p:aaabb

i/p:aaabbc
o/p:a3b2c1

-- 
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] help

2011-09-13 Thread shady
RS Agrawal is an author. Title of the book would have been more precise.

On Tue, Sep 13, 2011 at 10:45 AM, sanil gandhi...
wrote:

>
>
> R.S.Agrawal
>
>
> --
> Regards,
> Sanil Gandhi.
> 9423851845.
>
>  --
> 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] help

2011-09-12 Thread sanil gandhi...
R.S.Agrawal


-- 
Regards,
Sanil Gandhi.
9423851845.

-- 
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] help

2011-09-12 Thread wellwisher
please suggest me some good aptitude books

-- 
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] Help ! - Explain Sscanf

2011-08-30 Thread Abhishek Yadav
so what should be the correct question after writing % specifier.

On Tue, Aug 30, 2011 at 11:48 PM, Sanjay Rajpal  wrote:

> yes % has to be there.
>
> Sanju
> :)
>
>
>
> On Tue, Aug 30, 2011 at 11:12 AM, sukran dhawan wrote:
>
>> yes conversion specifier missing i think
>>
>>
>> On Tue, Aug 30, 2011 at 11:37 PM, SANDEEP CHUGH 
>> wrote:
>>
>>> but sanjay in the ques it is "*c*cd"
>>>
>>> shudn't there be a % before that ??
>>>
>>>
>>> On Tue, Aug 30, 2011 at 11:22 PM, Sanjay Rajpal wrote:
>>>
 Run the following program :

 main()
 {
 int a,b;
 scanf("%d %*d",&a,&b);
 printf("\na= %d, b=%d",a,b);
 }

 now see the values of a and b, and post the result here.

 Sanju
 :)



 On Tue, Aug 30, 2011 at 10:46 AM, sukran dhawan >>> > wrote:

> i don think so.can u brief it ?
>
>
> On Tue, Aug 30, 2011 at 10:45 PM, Sanjay Rajpal wrote:
>
>> only year gets scanned here, * suppresses assignment of day and month.
>>
>> Sanju
>> :)
>>
>>
>>
>> On Tue, Aug 30, 2011 at 9:08 AM, sukran dhawan <
>> sukrandha...@gmail.com> wrote:
>>
>>> sscanf is similar to scanf except that input is read from string
>>> rather than keyboard or i/o
>>> *c -supression character.it reads character and discards it.doesnt
>>> store it anywhere
>>>
>>>
>>> On Tue, Aug 30, 2011 at 9:32 PM, Mani Bharathi <
>>> manibharat...@gmail.com> wrote:
>>>
 char*str="11/1/1999";

 sscanf(str,"*c*cd",&month,&day,&year);

 --
 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/-/60kR7ykKiksJ.
 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.
>

  --
 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.
>

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

Re: [algogeeks] Help ! - Explain Sscanf

2011-08-30 Thread Sanjay Rajpal
yes % has to be there.

Sanju
:)



On Tue, Aug 30, 2011 at 11:12 AM, sukran dhawan wrote:

> yes conversion specifier missing i think
>
>
> On Tue, Aug 30, 2011 at 11:37 PM, SANDEEP CHUGH 
> wrote:
>
>> but sanjay in the ques it is "*c*cd"
>>
>> shudn't there be a % before that ??
>>
>>
>> On Tue, Aug 30, 2011 at 11:22 PM, Sanjay Rajpal  wrote:
>>
>>> Run the following program :
>>>
>>> main()
>>> {
>>> int a,b;
>>> scanf("%d %*d",&a,&b);
>>> printf("\na= %d, b=%d",a,b);
>>> }
>>>
>>> now see the values of a and b, and post the result here.
>>>
>>> Sanju
>>> :)
>>>
>>>
>>>
>>> On Tue, Aug 30, 2011 at 10:46 AM, sukran dhawan 
>>> wrote:
>>>
 i don think so.can u brief it ?


 On Tue, Aug 30, 2011 at 10:45 PM, Sanjay Rajpal wrote:

> only year gets scanned here, * suppresses assignment of day and month.
>
> Sanju
> :)
>
>
>
> On Tue, Aug 30, 2011 at 9:08 AM, sukran dhawan  > wrote:
>
>> sscanf is similar to scanf except that input is read from string
>> rather than keyboard or i/o
>> *c -supression character.it reads character and discards it.doesnt
>> store it anywhere
>>
>>
>> On Tue, Aug 30, 2011 at 9:32 PM, Mani Bharathi <
>> manibharat...@gmail.com> wrote:
>>
>>> char*str="11/1/1999";
>>>
>>> sscanf(str,"*c*cd",&month,&day,&year);
>>>
>>> --
>>> 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/-/60kR7ykKiksJ.
>>> 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.

>>>
>>>  --
>>> 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] Help ! - Explain Sscanf

2011-08-30 Thread sukran dhawan
yes conversion specifier missing i think

On Tue, Aug 30, 2011 at 11:37 PM, SANDEEP CHUGH wrote:

> but sanjay in the ques it is "*c*cd"
>
> shudn't there be a % before that ??
>
>
> On Tue, Aug 30, 2011 at 11:22 PM, Sanjay Rajpal  wrote:
>
>> Run the following program :
>>
>> main()
>> {
>> int a,b;
>> scanf("%d %*d",&a,&b);
>> printf("\na= %d, b=%d",a,b);
>> }
>>
>> now see the values of a and b, and post the result here.
>>
>> Sanju
>> :)
>>
>>
>>
>> On Tue, Aug 30, 2011 at 10:46 AM, sukran dhawan 
>> wrote:
>>
>>> i don think so.can u brief it ?
>>>
>>>
>>> On Tue, Aug 30, 2011 at 10:45 PM, Sanjay Rajpal wrote:
>>>
 only year gets scanned here, * suppresses assignment of day and month.

 Sanju
 :)



 On Tue, Aug 30, 2011 at 9:08 AM, sukran dhawan 
 wrote:

> sscanf is similar to scanf except that input is read from string rather
> than keyboard or i/o
> *c -supression character.it reads character and discards it.doesnt
> store it anywhere
>
>
> On Tue, Aug 30, 2011 at 9:32 PM, Mani Bharathi <
> manibharat...@gmail.com> wrote:
>
>> char*str="11/1/1999";
>>
>> sscanf(str,"*c*cd",&month,&day,&year);
>>
>> --
>> 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/-/60kR7ykKiksJ.
>> 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.
>>>
>>
>>  --
>> 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] Help ! - Explain Sscanf

2011-08-30 Thread SANDEEP CHUGH
but sanjay in the ques it is "*c*cd"

shudn't there be a % before that ??


On Tue, Aug 30, 2011 at 11:22 PM, Sanjay Rajpal  wrote:

> Run the following program :
>
> main()
> {
> int a,b;
> scanf("%d %*d",&a,&b);
> printf("\na= %d, b=%d",a,b);
> }
>
> now see the values of a and b, and post the result here.
>
> Sanju
> :)
>
>
>
> On Tue, Aug 30, 2011 at 10:46 AM, sukran dhawan wrote:
>
>> i don think so.can u brief it ?
>>
>>
>> On Tue, Aug 30, 2011 at 10:45 PM, Sanjay Rajpal  wrote:
>>
>>> only year gets scanned here, * suppresses assignment of day and month.
>>>
>>> Sanju
>>> :)
>>>
>>>
>>>
>>> On Tue, Aug 30, 2011 at 9:08 AM, sukran dhawan 
>>> wrote:
>>>
 sscanf is similar to scanf except that input is read from string rather
 than keyboard or i/o
 *c -supression character.it reads character and discards it.doesnt
 store it anywhere


 On Tue, Aug 30, 2011 at 9:32 PM, Mani Bharathi >>> > wrote:

> char*str="11/1/1999";
>
> sscanf(str,"*c*cd",&month,&day,&year);
>
> --
> 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/-/60kR7ykKiksJ.
> 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.
>>
>
>  --
> 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] Help ! - Explain Sscanf

2011-08-30 Thread Sanjay Rajpal
Run the following program :

main()
{
int a,b;
scanf("%d %*d",&a,&b);
printf("\na= %d, b=%d",a,b);
}

now see the values of a and b, and post the result here.

Sanju
:)



On Tue, Aug 30, 2011 at 10:46 AM, sukran dhawan wrote:

> i don think so.can u brief it ?
>
>
> On Tue, Aug 30, 2011 at 10:45 PM, Sanjay Rajpal  wrote:
>
>> only year gets scanned here, * suppresses assignment of day and month.
>>
>> Sanju
>> :)
>>
>>
>>
>> On Tue, Aug 30, 2011 at 9:08 AM, sukran dhawan wrote:
>>
>>> sscanf is similar to scanf except that input is read from string rather
>>> than keyboard or i/o
>>> *c -supression character.it reads character and discards it.doesnt store
>>> it anywhere
>>>
>>>
>>> On Tue, Aug 30, 2011 at 9:32 PM, Mani Bharathi 
>>> wrote:
>>>
 char*str="11/1/1999";

 sscanf(str,"*c*cd",&month,&day,&year);

 --
 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/-/60kR7ykKiksJ.
 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.
>

-- 
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] Help ! - Explain Sscanf

2011-08-30 Thread sukran dhawan
i don think so.can u brief it ?

On Tue, Aug 30, 2011 at 10:45 PM, Sanjay Rajpal  wrote:

> only year gets scanned here, * suppresses assignment of day and month.
>
> Sanju
> :)
>
>
>
> On Tue, Aug 30, 2011 at 9:08 AM, sukran dhawan wrote:
>
>> sscanf is similar to scanf except that input is read from string rather
>> than keyboard or i/o
>> *c -supression character.it reads character and discards it.doesnt store
>> it anywhere
>>
>>
>> On Tue, Aug 30, 2011 at 9:32 PM, Mani Bharathi 
>> wrote:
>>
>>> char*str="11/1/1999";
>>>
>>> sscanf(str,"*c*cd",&month,&day,&year);
>>>
>>> --
>>> 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/-/60kR7ykKiksJ.
>>> 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] Help ! - Explain Sscanf

2011-08-30 Thread Sanjay Rajpal
only year gets scanned here, * suppresses assignment of day and month.

Sanju
:)



On Tue, Aug 30, 2011 at 9:08 AM, sukran dhawan wrote:

> sscanf is similar to scanf except that input is read from string rather
> than keyboard or i/o
> *c -supression character.it reads character and discards it.doesnt store
> it anywhere
>
>
> On Tue, Aug 30, 2011 at 9:32 PM, Mani Bharathi wrote:
>
>> char*str="11/1/1999";
>>
>> sscanf(str,"*c*cd",&month,&day,&year);
>>
>> --
>> 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/-/60kR7ykKiksJ.
>> 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] Help ! - Explain Sscanf

2011-08-30 Thread sukran dhawan
sscanf is similar to scanf except that input is read from string rather than
keyboard or i/o
*c -supression character.it reads character and discards it.doesnt store it
anywhere

On Tue, Aug 30, 2011 at 9:32 PM, Mani Bharathi wrote:

> char*str="11/1/1999";
>
> sscanf(str,"*c*cd",&month,&day,&year);
>
> --
> 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/-/60kR7ykKiksJ.
> 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] Help ! - Explain Sscanf

2011-08-30 Thread Mani Bharathi
char*str="11/1/1999";

sscanf(str,"*c*cd",&month,&day,&year);

-- 
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/-/60kR7ykKiksJ.
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] Help!!

2011-08-27 Thread jestincobol nair
Hi folks !

  I am able to clear the aptitude round of placement but i will
not be called for the second interview round in the first interview round
they will not ask much questions and what ever they wil ask i will answer
dem correctly only . This has happened with me twice!! i am seriously
depressed what to do ??? i am not able to find out my weakness also :(

Plz some interview cracking material

Looking forward for your help!

<< Jestin Nair>>

-- 
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] help on this

2011-08-21 Thread Yogesh Bhati
we have to do final year project in colg itself.
intership project is another thing. I hv done that.

so ,any links frm where i can get detail for compiler contruction

or web crawler
plz suggest

-- 
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] help on this

2011-08-21 Thread sarvesh saran
Yogesh. Web OS is dead. Leave it and Move on...

Compiler construction is a cool thing to learn though.

For final year project, first find a good organization where you can do a
project. use your contacts. then find out what kind of projects are
available in that organization/IT company.

-sarvesh

On Mon, Aug 22, 2011 at 1:07 AM, Yogesh Bhati  wrote:

> h
> can ny suggest me some link for
> 1. compiler contruction
> 2. Web OS construction
>
> nd suggest some good final year projects...
>
> --
> 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] help on this

2011-08-21 Thread Yogesh Bhati
h
can ny suggest me some link for
1. compiler contruction
2. Web OS construction

nd suggest some good final year projects...

-- 
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] help!!!!!

2011-08-20 Thread Yogesh Bhati
thanx dude

-- 
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] help!!!!!

2011-08-20 Thread siddharth srivastava
On 20 August 2011 21:33, Yogesh Bhati  wrote:

> 4.ERP also
>
>
> webos wat is it?? brief
> is it related to *webOS* is a 
> proprietary
>  mobile operating 
> system running
> on the Linux kernel .
>

Sorry for confusion. I meant a web based operating system. (related to cloud
computing or ubiquitous computing)
Contributing to an existing OS or kernel project wouldn't be bad either
(specifically for your Core Programming interest :) )

>  --
> 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
Siddharth Srivastava

-- 
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] help!!!!!

2011-08-20 Thread Yogesh Bhati
4.ERP also


webos wat is it?? brief
is it related to *webOS* is a
proprietary
 mobile operating
system running
on the Linux kernel .

-- 
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] help!!!!!

2011-08-20 Thread siddharth srivastava
how about a webOS ? (it involves all 3 ;-) )

On 20 August 2011 21:22, Yogesh Bhati  wrote:

>  area of interest :
>>
>> 1.web related koi application
> 2.database
> 3.core programming
>
>  --
> 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
Siddharth Srivastava

-- 
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] help!!!!!

2011-08-20 Thread Yogesh Bhati
>
> area of interest :
>
> 1.web related koi application
2.database
3.core programming

-- 
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] help!!!!!

2011-08-20 Thread siddharth srivastava
On 20 August 2011 21:09, Yogesh Bhati  wrote:

> I m a CSE student
> Plz suggest me sum final yr project
> 1. good project that help me learn
> or
> 2.that solve sum real lyf situation means projects that are needed to make
> thngs easy for others
> do post ur suggestion
>

what is your area of interest ?



>  --
> 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
Siddharth Srivastava

-- 
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] help!!!!!

2011-08-20 Thread Yogesh Bhati
I m a CSE student
Plz suggest me sum final yr project
1. good project that help me learn
or
2.that solve sum real lyf situation means projects that are needed to make
thngs easy for others
do post ur suggestion

-- 
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] help

2011-08-20 Thread Amol Sharma
just search the groupyou'll find lots of questions
--


Amol Sharma
Third Year Student
Computer Science and Engineering
MNNIT Allahabad









On Sat, Aug 20, 2011 at 12:14 PM, mani walia  wrote:

> P TELL ME ABOUT HOW TO PREPARE

-- 
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] help

2011-08-19 Thread mani walia
ORACLE COMING TO OUR COLLEGE FOR TRAINING...

CAN ANYONE FROM THIS GROUP TELL ME ABOUT HOW TO PREPARE FOR THAT?

I WILL BE REALLY THANKFUL TO THAT PERSON..

PLEASE HELP ME..

-- 
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] help--code

2011-08-08 Thread siddharam suresh
nice explanation gaurav
Thank you,
Siddharam


On Mon, Aug 8, 2011 at 5:17 PM, Gaurav Menghani
wrote:

> The principle of locality of reference suggests if a reference is made
> to a memory location, next reference is close to it. So, it is a basic
> assumption that processors fetch memory locations close to it, to
> optimize fetch time. Since the array is stored in row-major form
> AFAIK, elements in the same row are closer to each other and more
> likely to be in cache together, as compared to elements in different
> rows.
>
> On Mon, Aug 8, 2011 at 5:12 PM, Prakash D  wrote:
> > @gaurav: are u sure?
> >
> > On Mon, Aug 8, 2011 at 3:40 PM, Amir  wrote:
> >>
> >> Both Will take same 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/-/hwcTUmMW_zsJ.
> >> 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.
> >
>
>
>
> --
> Gaurav Menghani
>
> --
> 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] help--code

2011-08-08 Thread Gaurav Menghani
The principle of locality of reference suggests if a reference is made
to a memory location, next reference is close to it. So, it is a basic
assumption that processors fetch memory locations close to it, to
optimize fetch time. Since the array is stored in row-major form
AFAIK, elements in the same row are closer to each other and more
likely to be in cache together, as compared to elements in different
rows.

On Mon, Aug 8, 2011 at 5:12 PM, Prakash D  wrote:
> @gaurav: are u sure?
>
> On Mon, Aug 8, 2011 at 3:40 PM, Amir  wrote:
>>
>> Both Will take same 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/-/hwcTUmMW_zsJ.
>> 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.
>



-- 
Gaurav Menghani

-- 
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] help--code

2011-08-08 Thread Prakash D
@gaurav: are u sure?

On Mon, Aug 8, 2011 at 3:40 PM, Amir  wrote:

> Both Will take same 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/-/hwcTUmMW_zsJ.
>
> 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] help--code

2011-08-08 Thread Amir
Both Will take same 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/-/hwcTUmMW_zsJ.
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] help--code

2011-08-08 Thread Kamakshii Aggarwal
got it..thanks :)

On Mon, Aug 8, 2011 at 3:27 PM, Gaurav Menghani
wrote:

> Sorry, I was thinking something else.
>
> Code 1 should be faster since arrays are stored in row-major fashion,
> the entire row will fit in cache, and accessing sequentially in the
> row would be faster because of higher cache hits than Code 2.
>
> On Mon, Aug 8, 2011 at 3:25 PM, Gaurav Menghani
>  wrote:
> > If the dimensions are same, both will execute equally fast.
> >
> > On Mon, Aug 8, 2011 at 3:21 PM, Kamakshii Aggarwal
> >  wrote:
> >>
> >> which code executes faster?
> >>  code1:- for(i=0;i >>   for(j=0;j >>   large_array[i][j]=0;
> >>  code2:- for(j=0;j >>   for(i=0;i >>large_array[i][j]=0;
> >>
> >>
> >>
> >> --
> >> Regards,
> >> Kamakshi
> >> kamakshi...@gmail.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.
> >>
> >
> >
> >
> > --
> > Gaurav Menghani
> >
>
>
>
> --
> Gaurav Menghani
>
> --
> 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,
Kamakshi
kamakshi...@gmail.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.



Re: [algogeeks] help--code

2011-08-08 Thread Gaurav Menghani
Sorry, I was thinking something else.

Code 1 should be faster since arrays are stored in row-major fashion,
the entire row will fit in cache, and accessing sequentially in the
row would be faster because of higher cache hits than Code 2.

On Mon, Aug 8, 2011 at 3:25 PM, Gaurav Menghani
 wrote:
> If the dimensions are same, both will execute equally fast.
>
> On Mon, Aug 8, 2011 at 3:21 PM, Kamakshii Aggarwal
>  wrote:
>>
>> which code executes faster?
>>  code1:- for(i=0;i>   for(j=0;j>   large_array[i][j]=0;
>>  code2:- for(j=0;j>   for(i=0;i>    large_array[i][j]=0;
>>
>>
>>
>> --
>> Regards,
>> Kamakshi
>> kamakshi...@gmail.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.
>>
>
>
>
> --
> Gaurav Menghani
>



-- 
Gaurav Menghani

-- 
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] help--code

2011-08-08 Thread Gaurav Menghani
If the dimensions are same, both will execute equally fast.

On Mon, Aug 8, 2011 at 3:21 PM, Kamakshii Aggarwal
 wrote:
>
> which code executes faster?
>  code1:- for(i=0;i   for(j=0;j   large_array[i][j]=0;
>  code2:- for(j=0;j   for(i=0;i    large_array[i][j]=0;
>
>
>
> --
> Regards,
> Kamakshi
> kamakshi...@gmail.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.
>



-- 
Gaurav Menghani

-- 
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] help--code

2011-08-08 Thread Kamakshii Aggarwal
which code executes faster?
 code1:- for(i=0;ihttp://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] help on string manipulation & bit manipulation

2011-08-05 Thread Shashank Jain
could u give some examples shiv fr string manipulation?

Shashank Jain
IIIrd year
Computer Engineering
Delhi College of Engineering



On Sat, Aug 6, 2011 at 1:57 AM, shiv narayan wrote:

> i have seen plenty of questions on string manipulation and bits
> operations asked in various comcanies exams.
>  any one give me some good links where i can find some really good
> tutorials on string manipulation.
>
> --
> 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] help on string manipulation & bit manipulation

2011-08-05 Thread shiv narayan
i have seen plenty of questions on string manipulation and bits
operations asked in various comcanies exams.
 any one give me some good links where i can find some really good
tutorials on string manipulation.

-- 
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] Help on Recursion & Bit Operators related problems

2011-08-03 Thread Shashank Jain
even this is a gud 1.
http://www.cprogramming.com/tutorial/bitwise_operators.html

Shashank Jain
IIIrd year
Computer Engineering
Delhi College of Engineering



On Thu, Aug 4, 2011 at 1:35 AM, Samba Ganapavarapu wrote:

> thanks raj,
> is this the bitwise operator tutorial that you told about ?
>
> http://www.topcoder.com/tc?module=Static&d1=tutorials&d2=bitManipulation
>
>
>
> On Wed, Aug 3, 2011 at 3:48 PM, raj kumar  wrote:
>
>> the best way to identify recursion is   when  finding solution to a
>> problem consist of finding solution to a sub problem
>> ex-5!=5*(4!)=5*4*(3!).
>> for bits see topcoder tutorials on bitwise operators
>>
>> --
>> 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] help with stringstream (STL)

2011-08-03 Thread Anuj Kumar
nice code :)

On Thu, Aug 4, 2011 at 3:10 AM, Victor Manuel Grijalva Altamirano <
kavic1.mar...@gmail.com> wrote:

> thanks Pankaj, i learn some new today
>
>
> --
> Victor Manuel Grijalva Altamirano
> Universidad Tecnologica de La Mixteca
>
> --
> 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.
>



-- 
Anuj Kumar
Third Year Undergraduate,
Dept. of Computer Science and Engineering
NIT Durgapur

-- 
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] help with stringstream (STL)

2011-08-03 Thread Victor Manuel Grijalva Altamirano
thanks Pankaj, i learn some new today

-- 
Victor Manuel Grijalva Altamirano
Universidad Tecnologica de La Mixteca

-- 
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] help with stringstream (STL)

2011-08-03 Thread Pankaj
 http://ideone.com/FtfQO

On Thu, Aug 4, 2011 at 2:54 AM, Victor Manuel Grijalva Altamirano <
kavic1.mar...@gmail.com> wrote:

> Hi, i don't know how to use stringstream of STL, if i have the string
> a="helloawordagoodabye", i need the next list:
> hello
> word good
> bye
> check that for each 'a' i need break the string...how
>
>
> --
> Victor Manuel Grijalva Altamirano
> Universidad Tecnologica de La Mixteca
> --
> 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] help with stringstream (STL)

2011-08-03 Thread Victor Manuel Grijalva Altamirano
Hi, i don't know how to use stringstream of STL, if i have the string
a="helloawordagoodabye", i need the next list:
hello
word good
bye
check that for each 'a' i need break the string...how


-- 
Victor Manuel Grijalva Altamirano
Universidad Tecnologica de La Mixteca

-- 
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] Help on Recursion & Bit Operators related problems

2011-08-03 Thread Samba Ganapavarapu
thanks raj,
is this the bitwise operator tutorial that you told about ?
http://www.topcoder.com/tc?module=Static&d1=tutorials&d2=bitManipulation


On Wed, Aug 3, 2011 at 3:48 PM, raj kumar  wrote:

> the best way to identify recursion is   when  finding solution to a problem
> consist of finding solution to a sub problem
> ex-5!=5*(4!)=5*4*(3!).
> for bits see topcoder tutorials on bitwise operators
>
> --
> 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] Help on Recursion & Bit Operators related problems

2011-08-03 Thread raj kumar
the best way to identify recursion is   when  finding solution to a problem
consist of finding solution to a sub problem
ex-5!=5*(4!)=5*4*(3!).
for bits see topcoder tutorials on bitwise operators

-- 
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] Help on Recursion & Bit Operators related problems

2011-08-03 Thread Samba Ganapavarapu
Hi Guys,
Can someone suggest me a good articular / book / video / lecture on how to
find if recursion required for a given problem ?
Also on problems related to bit operations.

thank you,
Samba

-- 
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] Help for Thoughworks

2011-08-03 Thread coder dumca
hi reynald i have send u some questions  on the group

On Wed, Aug 3, 2011 at 10:36 AM, Reynald Suz wrote:

> Sorry for the typo, Its "Thoughtworks"
>
>
> On Wed, Aug 3, 2011 at 11:04 PM, Reynald  wrote:
>
>> Hi folks!
>>  If any of you have Thoughworks flow questions, Coding rounds
>> questions, Technical interview questions kindly please share. Thank
>> you.
>>
>> --
>> 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
> Reynald Reni
> Masters in Software Engineering
> CIT - India
>
>
> --
> 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] Help for Thoughworks

2011-08-03 Thread Reynald Suz
Sorry for the typo, Its "Thoughtworks"

On Wed, Aug 3, 2011 at 11:04 PM, Reynald  wrote:

> Hi folks!
>  If any of you have Thoughworks flow questions, Coding rounds
> questions, Technical interview questions kindly please share. Thank
> you.
>
> --
> 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
Reynald Reni
Masters in Software Engineering
CIT - India

-- 
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] Help for Thoughworks

2011-08-03 Thread Reynald
Hi folks!
 If any of you have Thoughworks flow questions, Coding rounds
questions, Technical interview questions kindly please share. Thank
you.

-- 
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] help to code

2011-07-05 Thread Tushar Bindal
If my interpretation is right, following should be the code.


int main()
{
int userInteger = 0;
cout << "Enter A Number "<> userInteger; // Ask For a number from the user
if (userInteger > 0) // Is the number valid?
{
int result = 0;
int prime[5] = { 2, 3, 5, 7, 11 };
int a,b, count = 0;
*for(a=1;a<=userInteger;++a) // Looping to user's input
{
  for(b=0;b < 5;++b) // Looping the prime numbers array
   {
   if (a % prime[b] == 0) //if divisible by any number, just end it there
   break;
  }
 //break or end of loop will bring the control here
 if(b==5) //a was not divisible by any of the first 5 prime numbers
 {
 result+=a;
 ++count;
 }
}*
cout << "Numbers Not evenly divisible by 5 prime numbers: " << count
<< endl;
cout << "The Sum of numbers not evenly divisible by 5 prime numbers: "
<< result << endl;
}
getch();
return 0;
}



As per my solution,
Test Cases:
1)
userInteger = 20
count = 4
Numbers will be: 1, 13, 17, 19
result = 50

2)
userInteger = 35
count = 7
Numbers will be: 1, 13, 17, 19, 23, 29, 31
result = 133




Even numbers can never be there in this list as they are all divisible by 2.
Bfore 169, only prime numbers can be included.
Hope my interpretation of your question was correct

-- 
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] help to code

2011-07-05 Thread Tushar Bindal
I think you are getting it wrong.
Surender, your solution says that numbers divisible by all of the first 5
prime numbers will be taken into account whereas the question says that only
the numbers *not* evenly divisible by *any* of the first 5 prime numbers are
to be added.

Shiv,
you are making two mistakes:
1. you say n is also included but your code excludes it.
2. you are just checking if a number is not divisible by one of the 5 prime
numbers. If it is not divisible by any one number, you add it to your
result, whereas your language of the question suggests that it should be
that numbers which are not divisible by any of the five numbers, i.e., not
divisible by all the 5 numbers ( not the ones divisible by just ant one of
the 5).

Hope I am correct in my interpretation.

-- 
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] help to code

2011-07-05 Thread surender sanke
val = 2*3*5*7*11
for(i = 0 to n-1)
  if(val%a[i] == 0)
 count++,sum+=a[i];

surender

On Tue, Jul 5, 2011 at 10:10 PM, Rajeev Bharshetty <
rajeev.open.1...@gmail.com> wrote:

> Clarification : The number (count) is the number of elements between 1 and
> n which are not evenly divisible by 5 prime numbers
> and the result is the sum of all the numbers between 1
> and n which are not evenly divisible by 5 prime numbers . Right???
>
> For Example : if n=5 then
> count ->2 (i.e  1 and 3 )
>   and result = 5
>
> If I am wrong ,Please Correct me and give me the outputs expected
>
> Thank You
>
> Rajeev N B
>
>
> On Tue, Jul 5, 2011 at 12:17 PM, shiv narayan 
> wrote:
>
>> Write a program that accepts an input integer n, and calculates the
>> number and sum of all the numbers between 1 and n (inclusive) that are
>> NOT evenly divisible by ANY of the first 5 prime numbers (2,3,5,7,11).
>> The program should print out a clearly labeled count and sum
>> my code is : it is not giving correct result
>>
>> #include 
>> #include
>> using namespace std;
>> int main()
>> {
>> int userInteger = 0;
>> cout << "Enter A Number "<> cin >> userInteger; // Ask For a number from the user
>> if (userInteger > 0) // Is the number valid?
>> {
>> int result = 0;
>> int prime[5] = { 2, 3, 5, 7, 11 };
>> int a = 1, count = 0;
>> while (a < userInteger) // Looping to user's input
>> {
>> int b = 0;
>> while (b < 5) // Looping the prime numbers array
>> {
>> if (a % prime[b])
>> {
>> result += a; // If Not evenly divisible by prime number at index 'b'
>> count++;
>> }
>> b++;
>> }
>> a++; // Increment the counter
>> }
>> cout << "Numbers Not evenly divisible by 5 prime numbers: " << count
>> << endl;
>> cout << "The Sum of numbers not evenly divisible by 5 prime numbers: "
>> << result << endl;
>> }
>> getch();
>> 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, 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] help to code

2011-07-05 Thread Rajeev Bharshetty
Clarification : The number (count) is the number of elements between 1 and n
which are not evenly divisible by 5 prime numbers
and the result is the sum of all the numbers between 1
and n which are not evenly divisible by 5 prime numbers . Right???

For Example : if n=5 then
count ->2 (i.e  1 and 3 )
  and result = 5

If I am wrong ,Please Correct me and give me the outputs expected

Thank You

Rajeev N B

On Tue, Jul 5, 2011 at 12:17 PM, shiv narayan wrote:

> Write a program that accepts an input integer n, and calculates the
> number and sum of all the numbers between 1 and n (inclusive) that are
> NOT evenly divisible by ANY of the first 5 prime numbers (2,3,5,7,11).
> The program should print out a clearly labeled count and sum
> my code is : it is not giving correct result
>
> #include 
> #include
> using namespace std;
> int main()
> {
> int userInteger = 0;
> cout << "Enter A Number "< cin >> userInteger; // Ask For a number from the user
> if (userInteger > 0) // Is the number valid?
> {
> int result = 0;
> int prime[5] = { 2, 3, 5, 7, 11 };
> int a = 1, count = 0;
> while (a < userInteger) // Looping to user's input
> {
> int b = 0;
> while (b < 5) // Looping the prime numbers array
> {
> if (a % prime[b])
> {
> result += a; // If Not evenly divisible by prime number at index 'b'
> count++;
> }
> b++;
> }
> a++; // Increment the counter
> }
> cout << "Numbers Not evenly divisible by 5 prime numbers: " << count
> << endl;
> cout << "The Sum of numbers not evenly divisible by 5 prime numbers: "
> << result << endl;
> }
> getch();
> 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, 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] Help!!

2011-07-05 Thread KK
This is the solution to the MST problem
m getting WA again n again... cant figure out where's the mistake...
so plzzz help!!!
https://www.spoj.pl/problems/BLINNET/



#include
#include
#include
#include
#include

#define MAXINT (int)9e9
#define TR(a,it)for(typeof((a).begin()) it=(a).begin(); it!
=(a).end(); ++it)
using namespace std;

struct node
{
   long int data;
   string name;
   long int cost;
   long int distance;
   long int parent;

   friend bool operator>(const node &a, const node& b);
};

long int prims(vector< list > &adjlist, int n);

int main()
{
 freopen("input.txt", "r", stdin);
 freopen("output.txt", "w", stdout);

 long int n, t, no_neigh;
 cin >> t;
 while(t--)
 {
   vector< list > adjlist;
   node temp;
   getchar();
   cin >> n;
   adjlist.resize(n + 1);
   for(int i=1; i<=n; i++)
   {
cin >> temp.name;
//temp.data = i;
//adjlist[i].push_back(temp);

cin >> no_neigh;
for(int j=1; j<=no_neigh; j++)
{
 cin >> temp.data >> temp.cost;
 adjlist[i].push_back(temp);
}
   }

   /*for(int i=1; i<=n; i++)
   {
   cout << i << ":" << endl;
   TR(adjlist[i], it)
  cout << it->data << " " << it->cost << endl;
   }*/

   cout << prims(adjlist, n) << endl;
 }
}

bool operator>(const node &a, const node& b)
{
 return a.distance > b.distance;
}

long int prims(vector< list > &adjlist, int n)
{
  priority_queue, greater > pq;
  node heap[n+1];
  for(long int i=1; i<=n; i++)
  {
heap[i].data = i;
heap[i].distance = MAXINT;
heap[i].parent = -1;
  }

  long int start = 1;
  heap[start].distance = 0;
  pq.push(heap[start]);

  while(!pq.empty())
  {
node top = pq.top();   pq.pop();
//cout << "popped :" << top.data << " " << endl;
if(top.distance <= heap[top.data].distance)
{
  //cout << "Traversed " << endl;
  TR(adjlist[top.data], it)
  {
   if(heap[it->data].distance > it->cost)
   {
heap[it->data].distance = it->cost;
heap[it->data].parent = top.data;
//cout << "Pushed " << it->data << endl;
pq.push(heap[it->data]);
   }
  }
}
  }

  long int sum = 0;
  for(int i=1; i<=n; i++)
  sum += heap[i].distance;
  return sum;
}

-- 
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] help to code

2011-07-04 Thread shiv narayan
Write a program that accepts an input integer n, and calculates the
number and sum of all the numbers between 1 and n (inclusive) that are
NOT evenly divisible by ANY of the first 5 prime numbers (2,3,5,7,11).
The program should print out a clearly labeled count and sum
my code is : it is not giving correct result

#include 
#include
using namespace std;
int main()
{
int userInteger = 0;
cout << "Enter A Number "<> userInteger; // Ask For a number from the user
if (userInteger > 0) // Is the number valid?
{
int result = 0;
int prime[5] = { 2, 3, 5, 7, 11 };
int a = 1, count = 0;
while (a < userInteger) // Looping to user's input
{
int b = 0;
while (b < 5) // Looping the prime numbers array
{
if (a % prime[b])
{
result += a; // If Not evenly divisible by prime number at index 'b'
count++;
}
b++;
}
a++; // Increment the counter
}
cout << "Numbers Not evenly divisible by 5 prime numbers: " << count
<< endl;
cout << "The Sum of numbers not evenly divisible by 5 prime numbers: "
<< result << endl;
}
getch();
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, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] help..

2011-07-02 Thread keyan karthi
yup :)

On Sat, Jul 2, 2011 at 1:38 PM, Shalini Sah  wrote:

> i guess the no. of 1s in the binary representation of the number is the
> answer..for 6 its 2...
>
>
> On Sat, Jul 2, 2011 at 1:32 PM, cegprakash  wrote:
>
>> the length of the rope is l units.
>> I can only cut any rope into two halves.
>>
>> for example if the length of the rope is 8 and we need a length of
>> rope 6
>>
>> we first cut into two halves and we get 4, 4
>> now we cut any of the half again and we get 4,2,2
>>
>> now we can merge 4 and 2 and form a rope of length 6.
>>
>> in this example we need a minimum of 2 cuts to get the length of rope
>> 6 from 8
>>
>> assume that l is always a power of 2 and we need always a even length
>> of rope from it how to find the number of minimum cuts needed to get
>> the new rope?.
>>
>> --
>> 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] help..

2011-07-02 Thread Shalini Sah
i guess the no. of 1s in the binary representation of the number is the
answer..for 6 its 2...

On Sat, Jul 2, 2011 at 1:32 PM, cegprakash  wrote:

> the length of the rope is l units.
> I can only cut any rope into two halves.
>
> for example if the length of the rope is 8 and we need a length of
> rope 6
>
> we first cut into two halves and we get 4, 4
> now we cut any of the half again and we get 4,2,2
>
> now we can merge 4 and 2 and form a rope of length 6.
>
> in this example we need a minimum of 2 cuts to get the length of rope
> 6 from 8
>
> assume that l is always a power of 2 and we need always a even length
> of rope from it how to find the number of minimum cuts needed to get
> the new rope?.
>
> --
> 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] help..

2011-07-02 Thread cegprakash
the length of the rope is l units.
I can only cut any rope into two halves.

for example if the length of the rope is 8 and we need a length of
rope 6

we first cut into two halves and we get 4, 4
now we cut any of the half again and we get 4,2,2

now we can merge 4 and 2 and form a rope of length 6.

in this example we need a minimum of 2 cuts to get the length of rope
6 from 8

assume that l is always a power of 2 and we need always a even length
of rope from it how to find the number of minimum cuts needed to get
the new rope?.

-- 
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] help

2011-06-16 Thread DIPANKAR DUTTA
(this is dependon on compiler implementaion)this is due to shortcircuit
implementaion of intermidiate code genaration phase of compiler..
please read Aho ullman book of compiler desgn to get more details.

On Wed, Jun 15, 2011 at 12:51 AM, snehi jain  wrote:

>
> first it checks Q if that is NOT true then it computes R else it doesn't.
>
> this is the correct line .
>   On Tue, Jun 14, 2011 at 10:21 PM, snehi jain wrote:
>
>> that is what is happening here
>> m = ++i || (++j && ++k);
>>
>> in C if   P = Q || R;
>>
>> first it checks Q if that is NOT true then it computes C else it doesn't.
>>
>> ++ is a unary operator so before the || and && operations can happen
>> increment will take place. This justifies the higher precedence of ++
>> operator.
>>
>> in the above example  i gets incremented to -2 first and then || operation
>> is executed. i has a non-zero value therefore no computation is done for
>> (++j && ++k); .
>>
>> keep initial value of i to -1 then  after m = ++i || (++j && ++k);
>> statement
>> i = 0 , j = 3 , k =1 and m =1
>>
>>
>>
>>
>>
>>  On Tue, Jun 14, 2011 at 10:02 PM, nicks wrote:
>>
>>> hmm...someone explain...me too confused :(
>>>
>>>
>>> On Tue, Jun 14, 2011 at 9:14 AM, rahul dixit wrote:
>>>

 bt increment operator has the higher precedence than || and &&
 so all the variables should be incremented  first then && and then ||
 should  be evaluated
 then how it is happening.plz explain


 rahul dixit
 Du-Mca

 --
 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.
>



-- 
Thanks and Regards,
--
*DIPANKAR DUTTA*
Visiting Research Scholar
Dept of Computing,
Macquarie University, Sydney, Australia
ph.no-+61 2 98509079 ( Mon-Fri 10:15-7:00) Sydney time
email: dipankar.du...@mq.edu.au

-- 
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] help me wd the following problem

2011-06-15 Thread Ankit Sablok
Hello friends I am thinking of a combinatorics solution to this
problem on spoj but cant come up wd a formula please suggest me some
technique to solve this problem

http://www.spoj.pl/problems/CHAIR/

-- 
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] help

2011-06-14 Thread snehi jain
first it checks Q if that is NOT true then it computes R else it doesn't.

this is the correct line .
On Tue, Jun 14, 2011 at 10:21 PM, snehi jain  wrote:

> that is what is happening here
> m = ++i || (++j && ++k);
>
> in C if   P = Q || R;
>
> first it checks Q if that is NOT true then it computes C else it doesn't.
>
> ++ is a unary operator so before the || and && operations can happen
> increment will take place. This justifies the higher precedence of ++
> operator.
>
> in the above example  i gets incremented to -2 first and then || operation
> is executed. i has a non-zero value therefore no computation is done for
> (++j && ++k); .
>
> keep initial value of i to -1 then  after m = ++i || (++j && ++k);
> statement
> i = 0 , j = 3 , k =1 and m =1
>
>
>
>
>
> On Tue, Jun 14, 2011 at 10:02 PM, nicks wrote:
>
>> hmm...someone explain...me too confused :(
>>
>>
>> On Tue, Jun 14, 2011 at 9:14 AM, rahul dixit wrote:
>>
>>>
>>> bt increment operator has the higher precedence than || and &&
>>> so all the variables should be incremented  first then && and then ||
>>> should  be evaluated
>>> then how it is happening.plz explain
>>>
>>>
>>> rahul dixit
>>> Du-Mca
>>>
>>>  --
>>> 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] help

2011-06-14 Thread snehi jain
that is what is happening here
m = ++i || (++j && ++k);

in C if   P = Q || R;

first it checks Q if that is NOT true then it computes C else it doesn't.

++ is a unary operator so before the || and && operations can happen
increment will take place. This justifies the higher precedence of ++
operator.

in the above example  i gets incremented to -2 first and then || operation
is executed. i has a non-zero value therefore no computation is done for
(++j && ++k); .

keep initial value of i to -1 then  after m = ++i || (++j && ++k);
statement
i = 0 , j = 3 , k =1 and m =1





On Tue, Jun 14, 2011 at 10:02 PM, nicks  wrote:

> hmm...someone explain...me too confused :(
>
>
> On Tue, Jun 14, 2011 at 9:14 AM, rahul dixit wrote:
>
>>
>> bt increment operator has the higher precedence than || and &&
>> so all the variables should be incremented  first then && and then ||
>> should  be evaluated
>> then how it is happening.plz explain
>>
>>
>> rahul dixit
>> Du-Mca
>>
>>  --
>> 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] help

2011-06-14 Thread nicks
hmm...someone explain...me too confused :(

On Tue, Jun 14, 2011 at 9:14 AM, rahul dixit wrote:

>
> bt increment operator has the higher precedence than || and &&
> so all the variables should be incremented  first then && and then ||
> should  be evaluated
> then how it is happening.plz explain
>
>
> rahul dixit
> Du-Mca
>
>  --
> 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] help

2011-06-14 Thread rahul dixit
bt increment operator has the higher precedence than || and &&
so all the variables should be incremented  first then && and then ||
should  be evaluated
then how it is happening.plz explain


rahul dixit
Du-Mca

-- 
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.



  1   2   >