[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

[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

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,

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 kartmu...@gmail.comwrote: O/p will not be 0. 1.00 is the result

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 rohit.nsi...@gmail.com wrote: output for me for the previous snippet localhost:slingshot rohitjangid$ ./a.out 1799476872 1799474584 localhost:slingshot rohitjangid$ ./a.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

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 rohit.nsi...@gmail.com wrote: yup , it is showing 0 0 on ideone as well . so my gcc compiler is i686-apple-darwin11-llvm-gcc-4.2.

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 #includestdio.h 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 .

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

[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,

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

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 gmagog...@gmail.comwrote: 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

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 float 1.00 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

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

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

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 tushicom...@gmail.com 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

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

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

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 atul.87fri...@gmail.com 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,

[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

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

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 atul.87fri...@gmail.comwrote: 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

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

[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

[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

[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

[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

[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

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

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 shubham.bans...@gmail.comwrote: If anyone have E-book of Quantative Aptitude For CAT by Arun Sharma.?? Then kindly send to my email.or

Re: [algogeeks] help nedded

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

Re: [algogeeks] help nedded

2011-09-24 Thread Kunal Yadav
2nd #includeiostream #includevector using namespace std; int main() { string s; cins; int i=0,count=1; vectorint no; vectorchar c; while(s[i]!='\0') { if(s[i]==s[i+1]) count++; else { c.push_back(s[i]);

[algogeeks] help nedded

2011-09-22 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

Re: [algogeeks] help nedded

2011-09-22 Thread Dheeraj Sharma
for 2nd one #includeiostream #includeconio.h using namespace std; int main() { char str[100]; cinstr; char ch=str[0]; int count=0,i=0; while(str[i]) { if(str[i]==ch) count++; else {

Re: [algogeeks] help nedded

2011-09-22 Thread Dheeraj Sharma
for 1st #includeiostream #includeconio.h #includestring.h using namespace std; int main() { char str[100]; cinstr; int len=strlen(str); int i=1; while(ilen) { int x=str[i]-48; while(x--) coutstr[i-1]; i+=2;

[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

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... sanil.gandh...@gmail.comwrote: R.S.Agrawal -- Regards, Sanil Gandhi. 9423851845. -- You received this message because you are subscribed to the Google

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

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

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 manibharat...@gmail.comwrote: char*str=11/1/1999;

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 sukrandha...@gmail.comwrote: sscanf is similar to scanf except that input is read from string rather than keyboard or i/o *c -supression character.it reads

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 srn...@gmail.com 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.comwrote: sscanf is similar to scanf

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 srn...@gmail.com 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

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 sandeep.aa...@gmail.comwrote: 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 srn...@gmail.com wrote: Run the following program

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 sukrandha...@gmail.comwrote: yes conversion specifier missing i think On Tue, Aug 30, 2011 at 11:37 PM, SANDEEP CHUGH sandeep.aa...@gmail.comwrote: but sanjay in the ques it is *c*cd shudn't there be a %

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 srn...@gmail.com wrote: yes % has to be there. Sanju :) On Tue, Aug 30, 2011 at 11:12 AM, sukran dhawan sukrandha...@gmail.comwrote: yes conversion specifier missing i

[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

[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

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.

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

[algogeeks] help

2011-08-20 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

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 http://gplus.to/amolsharma99 http://twitter.com/amolsharma99http://in.linkedin.com/pub/amol-sharma/21/79b/507http://youtube.com/amolsharma99 On Sat,

[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

Re: [algogeeks] help!!!!!

2011-08-20 Thread siddharth srivastava
On 20 August 2011 21:09, Yogesh Bhati ybha...@gmail.com 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

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

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 ybha...@gmail.com 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

Re: [algogeeks] help!!!!!

2011-08-20 Thread Yogesh Bhati
4.ERP also webos wat is it?? brief is it related to *webOS* is a proprietaryhttp://en.wikipedia.org/wiki/Proprietary_software mobile operating systemhttp://en.wikipedia.org/wiki/Mobile_operating_system running on the Linux kernel http://en.wikipedia.org/wiki/Linux_kernel. -- You received this

Re: [algogeeks] help!!!!!

2011-08-20 Thread siddharth srivastava
On 20 August 2011 21:33, Yogesh Bhati ybha...@gmail.com wrote: 4.ERP also webos wat is it?? brief is it related to *webOS* is a proprietaryhttp://en.wikipedia.org/wiki/Proprietary_software mobile operating systemhttp://en.wikipedia.org/wiki/Mobile_operating_system running on the Linux

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

[algogeeks] help--code

2011-08-08 Thread Kamakshii Aggarwal
which code executes faster? code1:- for(i=0;in;i++) for(j=0;jn;j++) large_array[i][j]=0; code2:- for(j=0;jn;j++) for(i=0;in;i++) large_array[i][j]=0; -- Regards, Kamakshi kamakshi...@gmail.com -- You received this message because you are subscribed to the Google Groups

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 kamakshi...@gmail.com wrote: which code executes faster?  code1:- for(i=0;in;i++)   for(j=0;jn;j++)   large_array[i][j]=0;  code2:- for(j=0;jn;j++)   for(i=0;in;i++)    

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

Re: [algogeeks] help--code

2011-08-08 Thread Kamakshii Aggarwal
got it..thanks :) On Mon, Aug 8, 2011 at 3:27 PM, Gaurav Menghani gaurav.mengh...@gmail.comwrote: 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

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.

Re: [algogeeks] help--code

2011-08-08 Thread Prakash D
@gaurav: are u sure? On Mon, Aug 8, 2011 at 3:40 PM, Amir pkpat...@gmail.com 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

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

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 gaurav.mengh...@gmail.comwrote: 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

[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

[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

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 reynaldsus...@gmail.com 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

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 reynaldsus...@gmail.comwrote: Sorry for the typo, Its Thoughtworks On Wed, Aug 3, 2011 at 11:04 PM, Reynald reynaldsus...@gmail.com wrote: Hi folks! If any of you have Thoughworks flow

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

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=Staticd1=tutorialsd2=bitManipulation On Wed, Aug 3, 2011 at 3:48 PM, raj kumar megamonste...@gmail.com wrote: the best way to identify recursion is when finding solution to a

[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

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

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

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

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 sambasiv...@gmail.comwrote: thanks raj, is this the bitwise operator tutorial that

[algogeeks] help to code

2011-07-05 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

[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/ #includeiostream #includestring #includevector #includelist #includequeue #define MAXINT (int)9e9 #define TR(a,it)

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

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

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

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 endl; 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,b, count = 0;

[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

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 cegprak...@gmail.com 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

Re: [algogeeks] help..

2011-07-02 Thread keyan karthi
yup :) On Sat, Jul 2, 2011 at 1:38 PM, Shalini Sah shalinisah.luv4cod...@gmail.com 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 cegprak...@gmail.com wrote: the length of the rope is l

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 snehijai...@gmail.com wrote: first

[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

Re: [algogeeks] help

2011-06-14 Thread nicks
What about precedence order then. http://www.difranco.net/cop2220/op-prec.htm i mean acc. to precedence order should be evaluated before || in the second exampleresult should be k=1,j=3 and i= -2 On Mon, Jun 13, 2011 at 11:41 AM, udit sharma sharmaudit...@gmail.comwrote: hmm. Sry yr...

Re: [algogeeks] help

2011-06-14 Thread nicks
anybody having idea about preference order ?? On Tue, Jun 14, 2011 at 4:20 AM, nicks crazy.logic.k...@gmail.com wrote: What about precedence order then. http://www.difranco.net/cop2220/op-prec.htm i mean acc. to precedence order should be evaluated before || in the second

Re: [algogeeks] help

2011-06-14 Thread snehi jain
according to precedence m= ++i || ++j ++k will become m = ++i || (++j ++k);NOT this m = (++i || ++j) ++k; first i gets incremented and since that gives a non-zero value the rest of the statement is not executed. On Tue, Jun 14, 2011 at 8:41 PM, nicks

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

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 dixit.rahu...@gmail.comwrote: 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

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

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 snehijai...@gmail.com 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

[algogeeks] help

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

Re: [algogeeks] help

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

Re: [algogeeks] help

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

  1   2   >