Re: [algogeeks] Adobe Written Test - 25 SEPT 2010
@dave sir: i understand your point, here my solution is only limited to hold the divisor in range of integer.. On Sat, Sep 22, 2012 at 1:41 AM, Dave dave_and_da...@juno.com wrote: @Rahul: What does this print for n = 193? Dave On Friday, September 21, 2012 12:14:18 AM UTC-5, Rahul Kumar Patle wrote: here is my code: main() { int n=13; int divisor=1; int temp; while( divisor n ) divisor = 10 * divisor + 1; printf(%d\n , divisor); temp = divisor; while(n) { if(temp%n == 0) break; temp = 10 * (temp % n) + 1; divisor = 10 * divisor + 1; while( temp n ) { divisor = 10 * divisor + 1; temp = 10 * temp + 1; } printf(%d and %d\n , divisor, temp); } printf(%d\n, divisor); } On Fri, Sep 21, 2012 at 10:30 AM, Rahul Kumar Patle patlera...@gmail.com wrote: @navin: you have to find a number containing all 1's which is divisible by a given number xx...3, here given number contains 3 at it unit place... On Fri, Sep 21, 2012 at 10:25 AM, Navin Kumar algorit...@gmail.comwrote: @all: Please explain question number 8. I am not getting the question exactly what it says ? On Fri, Sep 21, 2012 at 9:30 AM, Dave dave_an...@juno.com wrote: @Bharat: Simulate long division, dividing a number ...1 by the number. You can do this one digit at a time, printing the quotient digit by digit until you bring down a zero. It could look something like this: int n=the number that ends with 3; int divisor=1; while( divisor n ) divisor = 10 * divisor + 1; while( divisor != 0 ) { printf(%d,divisor / n); divisor = 10 * (divisor % n) + 1; } printf(\n); Dave On Thursday, September 20, 2012 9:45:55 PM UTC-5, bharat wrote: what is the solution(not brute force) for 8th question ? On Fri, Sep 14, 2012 at 5:19 PM, Bhupendra Dubey bhupen...@gmail.com wrote: Which edition of barron? On Wed, Sep 28, 2011 at 6:05 PM, VIHARRI vihar...@gmail.com wrote: 1. Java uses stack for byte code in JVM - each instruction is of one byte, so how many such instructions are possible in an operating system. 2. Three processes p1, p2, p3, p4 - each have sizes 1GB, 1.2GB, 2GB, 1GB. And each processes is executed as a time sharing fashion. Will they be executed on an operating system. 3. write a recursive program for reversing the linked list. 4. write a program for checking the given number is a palindrome. ( dont use string / array for converting number ). 5. write a recursive program for multiplying two numbers a and b, with additions. The program should take care of doing min # additions as that of which ever number is lower between a and b. 6. There are two sets A and B with n integers, write a program to check the whether there exists two numbers a in A and b in B such that a+b = val ( val is given ); 7. write a program to return the row number which has max no of one's in an array of NxN matrix where all 1's occur before any 0's starts. 8. For every number that has 3 in its units place has one multiple which has all one's i.e. 111 is such multiple and 13 has a multiple 11. Write a program to find such multiple for any number that has 3 at its units place. 9. what are the maximum no of edges that can be connected in a graph of n vertices and 0 edges such that after adding edges given graph is still disconnected. 10. One Question on critical section. For Analytical Test - Prepare the Questions in the barrons book of sample paper - 2 ( they have give two passages ) -- 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=enhttp://groups.google.com/group/algogeeks?hl=en . -- Thanks regards Bhupendra -- 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=enhttp://groups.google.com/group/algogeeks?hl=en . -- 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/-/pDBPxDR3R1oJhttps://groups.google.com/d/msg/algogeeks/-/pDBPxDR3R1oJ . 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 http://groups.google.com/group/algogeeks?hl=en . -- You received this message because you are
Re: [algogeeks] Adobe Written Test - 25 SEPT 2010
@Navin: It means that given a positive integer n whose decimal representation ends in 3, find a multiple, m*n, which is written solely with the digit 1. E.g., 3: 37 * 3 = 111; 13: 8547 * 13 = 111,111. Dave On Thursday, September 20, 2012 11:56:08 PM UTC-5, Navin Kumar wrote: @all: Please explain question number 8. I am not getting the question exactly what it says ? On Fri, Sep 21, 2012 at 9:30 AM, Dave dave_an...@juno.com javascript:wrote: @Bharat: Simulate long division, dividing a number ...1 by the number. You can do this one digit at a time, printing the quotient digit by digit until you bring down a zero. It could look something like this: int n=the number that ends with 3; int divisor=1; while( divisor n ) divisor = 10 * divisor + 1; while( divisor != 0 ) { printf(%d,divisor / n); divisor = 10 * (divisor % n) + 1; } printf(\n); Dave On Thursday, September 20, 2012 9:45:55 PM UTC-5, bharat wrote: what is the solution(not brute force) for 8th question ? On Fri, Sep 14, 2012 at 5:19 PM, Bhupendra Dubey bhupen...@gmail.comwrote: Which edition of barron? On Wed, Sep 28, 2011 at 6:05 PM, VIHARRI vihar...@gmail.com wrote: 1. Java uses stack for byte code in JVM - each instruction is of one byte, so how many such instructions are possible in an operating system. 2. Three processes p1, p2, p3, p4 - each have sizes 1GB, 1.2GB, 2GB, 1GB. And each processes is executed as a time sharing fashion. Will they be executed on an operating system. 3. write a recursive program for reversing the linked list. 4. write a program for checking the given number is a palindrome. ( dont use string / array for converting number ). 5. write a recursive program for multiplying two numbers a and b, with additions. The program should take care of doing min # additions as that of which ever number is lower between a and b. 6. There are two sets A and B with n integers, write a program to check the whether there exists two numbers a in A and b in B such that a+b = val ( val is given ); 7. write a program to return the row number which has max no of one's in an array of NxN matrix where all 1's occur before any 0's starts. 8. For every number that has 3 in its units place has one multiple which has all one's i.e. 111 is such multiple and 13 has a multiple 11. Write a program to find such multiple for any number that has 3 at its units place. 9. what are the maximum no of edges that can be connected in a graph of n vertices and 0 edges such that after adding edges given graph is still disconnected. 10. One Question on critical section. For Analytical Test - Prepare the Questions in the barrons book of sample paper - 2 ( they have give two passages ) -- 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 http://groups.google.com/group/algogeeks?hl=en . -- Thanks regards Bhupendra -- 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 http://groups.google.com/group/algogeeks?hl=en. -- 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/-/pDBPxDR3R1oJ. To post to this group, send email to algo...@googlegroups.comjavascript: . To unsubscribe from this group, send email to algogeeks+...@googlegroups.com javascript:. 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 view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/LpHDrQKDb90J. 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] Adobe Written Test - 25 SEPT 2010
@Dave sir: Thanx for reply. your solution gives the exact multiple like 37 for 3, 8547 for 13. In the question i think we have to print the number which is 13x8547 which will be very large (out of integer range).In that case we have to store result in string. On Fri, Sep 21, 2012 at 12:09 PM, Dave dave_and_da...@juno.com wrote: @Navin: It means that given a positive integer n whose decimal representation ends in 3, find a multiple, m*n, which is written solely with the digit 1. E.g., 3: 37 * 3 = 111; 13: 8547 * 13 = 111,111. Dave On Thursday, September 20, 2012 11:56:08 PM UTC-5, Navin Kumar wrote: @all: Please explain question number 8. I am not getting the question exactly what it says ? On Fri, Sep 21, 2012 at 9:30 AM, Dave dave_an...@juno.com wrote: @Bharat: Simulate long division, dividing a number ...1 by the number. You can do this one digit at a time, printing the quotient digit by digit until you bring down a zero. It could look something like this: int n=the number that ends with 3; int divisor=1; while( divisor n ) divisor = 10 * divisor + 1; while( divisor != 0 ) { printf(%d,divisor / n); divisor = 10 * (divisor % n) + 1; } printf(\n); Dave On Thursday, September 20, 2012 9:45:55 PM UTC-5, bharat wrote: what is the solution(not brute force) for 8th question ? On Fri, Sep 14, 2012 at 5:19 PM, Bhupendra Dubey bhupen...@gmail.comwrote: Which edition of barron? On Wed, Sep 28, 2011 at 6:05 PM, VIHARRI vihar...@gmail.com wrote: 1. Java uses stack for byte code in JVM - each instruction is of one byte, so how many such instructions are possible in an operating system. 2. Three processes p1, p2, p3, p4 - each have sizes 1GB, 1.2GB, 2GB, 1GB. And each processes is executed as a time sharing fashion. Will they be executed on an operating system. 3. write a recursive program for reversing the linked list. 4. write a program for checking the given number is a palindrome. ( dont use string / array for converting number ). 5. write a recursive program for multiplying two numbers a and b, with additions. The program should take care of doing min # additions as that of which ever number is lower between a and b. 6. There are two sets A and B with n integers, write a program to check the whether there exists two numbers a in A and b in B such that a+b = val ( val is given ); 7. write a program to return the row number which has max no of one's in an array of NxN matrix where all 1's occur before any 0's starts. 8. For every number that has 3 in its units place has one multiple which has all one's i.e. 111 is such multiple and 13 has a multiple 11. Write a program to find such multiple for any number that has 3 at its units place. 9. what are the maximum no of edges that can be connected in a graph of n vertices and 0 edges such that after adding edges given graph is still disconnected. 10. One Question on critical section. For Analytical Test - Prepare the Questions in the barrons book of sample paper - 2 ( they have give two passages ) -- 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=enhttp://groups.google.com/group/algogeeks?hl=en . -- Thanks regards Bhupendra -- 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 http://groups.google.com/group/algogeeks?hl=en. -- 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/-/pDBPxDR3R1oJhttps://groups.google.com/d/msg/algogeeks/-/pDBPxDR3R1oJ . 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 http://groups.google.com/group/algogeeks?hl=en. -- 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/-/LpHDrQKDb90J. 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
Re: [algogeeks] Adobe Written Test - 25 SEPT 2010
@Navin: No problem. Just print a 1 instead of a quotient digit. That makes the code even simpler, like this: int n=the number that ends with 3; int divisor=1; printf(1); while( divisor != 0 ) { printf(1); divisor = 10 * (divisor % n) + 1; } printf(\n); Dave On Friday, September 21, 2012 2:05:55 AM UTC-5, Navin Kumar wrote: @Dave sir: Thanx for reply. your solution gives the exact multiple like 37 for 3, 8547 for 13. In the question i think we have to print the number which is 13x8547 which will be very large (out of integer range).In that case we have to store result in string. On Fri, Sep 21, 2012 at 12:09 PM, Dave dave_an...@juno.com javascript:wrote: @Navin: It means that given a positive integer n whose decimal representation ends in 3, find a multiple, m*n, which is written solely with the digit 1. E.g., 3: 37 * 3 = 111; 13: 8547 * 13 = 111,111. Dave On Thursday, September 20, 2012 11:56:08 PM UTC-5, Navin Kumar wrote: @all: Please explain question number 8. I am not getting the question exactly what it says ? On Fri, Sep 21, 2012 at 9:30 AM, Dave dave_an...@juno.com wrote: @Bharat: Simulate long division, dividing a number ...1 by the number. You can do this one digit at a time, printing the quotient digit by digit until you bring down a zero. It could look something like this: int n=the number that ends with 3; int divisor=1; while( divisor n ) divisor = 10 * divisor + 1; while( divisor != 0 ) { printf(%d,divisor / n); divisor = 10 * (divisor % n) + 1; } printf(\n); Dave On Thursday, September 20, 2012 9:45:55 PM UTC-5, bharat wrote: what is the solution(not brute force) for 8th question ? On Fri, Sep 14, 2012 at 5:19 PM, Bhupendra Dubey bhupen...@gmail.comwrote: Which edition of barron? On Wed, Sep 28, 2011 at 6:05 PM, VIHARRI vihar...@gmail.com wrote: 1. Java uses stack for byte code in JVM - each instruction is of one byte, so how many such instructions are possible in an operating system. 2. Three processes p1, p2, p3, p4 - each have sizes 1GB, 1.2GB, 2GB, 1GB. And each processes is executed as a time sharing fashion. Will they be executed on an operating system. 3. write a recursive program for reversing the linked list. 4. write a program for checking the given number is a palindrome. ( dont use string / array for converting number ). 5. write a recursive program for multiplying two numbers a and b, with additions. The program should take care of doing min # additions as that of which ever number is lower between a and b. 6. There are two sets A and B with n integers, write a program to check the whether there exists two numbers a in A and b in B such that a+b = val ( val is given ); 7. write a program to return the row number which has max no of one's in an array of NxN matrix where all 1's occur before any 0's starts. 8. For every number that has 3 in its units place has one multiple which has all one's i.e. 111 is such multiple and 13 has a multiple 11. Write a program to find such multiple for any number that has 3 at its units place. 9. what are the maximum no of edges that can be connected in a graph of n vertices and 0 edges such that after adding edges given graph is still disconnected. 10. One Question on critical section. For Analytical Test - Prepare the Questions in the barrons book of sample paper - 2 ( they have give two passages ) -- 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=enhttp://groups.google.com/group/algogeeks?hl=en . -- Thanks regards Bhupendra -- 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=enhttp://groups.google.com/group/algogeeks?hl=en . -- 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/-/pDBPxDR3R1oJhttps://groups.google.com/d/msg/algogeeks/-/pDBPxDR3R1oJ . 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 http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion
Re: [algogeeks] Adobe Written Test - 25 SEPT 2010
here is my code: main() { int n=13; int divisor=1; int temp; while( divisor n ) divisor = 10 * divisor + 1; printf(%d\n , divisor); temp = divisor; while(n) { if(temp%n == 0) break; temp = 10 * (temp % n) + 1; divisor = 10 * divisor + 1; while( temp n ) { divisor = 10 * divisor + 1; temp = 10 * temp + 1; } printf(%d and %d\n , divisor, temp); } printf(%d\n, divisor); } On Fri, Sep 21, 2012 at 10:30 AM, Rahul Kumar Patle patlerahulku...@gmail.com wrote: @navin: you have to find a number containing all 1's which is divisible by a given number xx...3, here given number contains 3 at it unit place... On Fri, Sep 21, 2012 at 10:25 AM, Navin Kumar algorithm.i...@gmail.comwrote: @all: Please explain question number 8. I am not getting the question exactly what it says ? On Fri, Sep 21, 2012 at 9:30 AM, Dave dave_and_da...@juno.com wrote: @Bharat: Simulate long division, dividing a number ...1 by the number. You can do this one digit at a time, printing the quotient digit by digit until you bring down a zero. It could look something like this: int n=the number that ends with 3; int divisor=1; while( divisor n ) divisor = 10 * divisor + 1; while( divisor != 0 ) { printf(%d,divisor / n); divisor = 10 * (divisor % n) + 1; } printf(\n); Dave On Thursday, September 20, 2012 9:45:55 PM UTC-5, bharat wrote: what is the solution(not brute force) for 8th question ? On Fri, Sep 14, 2012 at 5:19 PM, Bhupendra Dubey bhupen...@gmail.comwrote: Which edition of barron? On Wed, Sep 28, 2011 at 6:05 PM, VIHARRI vihar...@gmail.com wrote: 1. Java uses stack for byte code in JVM - each instruction is of one byte, so how many such instructions are possible in an operating system. 2. Three processes p1, p2, p3, p4 - each have sizes 1GB, 1.2GB, 2GB, 1GB. And each processes is executed as a time sharing fashion. Will they be executed on an operating system. 3. write a recursive program for reversing the linked list. 4. write a program for checking the given number is a palindrome. ( dont use string / array for converting number ). 5. write a recursive program for multiplying two numbers a and b, with additions. The program should take care of doing min # additions as that of which ever number is lower between a and b. 6. There are two sets A and B with n integers, write a program to check the whether there exists two numbers a in A and b in B such that a+b = val ( val is given ); 7. write a program to return the row number which has max no of one's in an array of NxN matrix where all 1's occur before any 0's starts. 8. For every number that has 3 in its units place has one multiple which has all one's i.e. 111 is such multiple and 13 has a multiple 11. Write a program to find such multiple for any number that has 3 at its units place. 9. what are the maximum no of edges that can be connected in a graph of n vertices and 0 edges such that after adding edges given graph is still disconnected. 10. One Question on critical section. For Analytical Test - Prepare the Questions in the barrons book of sample paper - 2 ( they have give two passages ) -- 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=enhttp://groups.google.com/group/algogeeks?hl=en . -- Thanks regards Bhupendra -- 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 http://groups.google.com/group/algogeeks?hl=en . -- 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/-/pDBPxDR3R1oJ. 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 Patlehttp://www.linkedin.com/profile/view?id=106245716trk=tab_pro M.Tech, School of Information
Re: [algogeeks] Adobe Written Test - 25 SEPT 2010
I thought about it some more, and realize that my code wasn't correct. Try this: int n = the number that ends with 3; // e.g., int n = 13; int d = 1; while( d % n != 0 ) { printf(1); d = 10 * (d % n) + 1; } printf(1\n); On Friday, September 21, 2012 11:07:29 AM UTC-5, Dave wrote: @Navin: No problem. Just print a 1 instead of a quotient digit . That makes the code even simpler, like this: int n=the number that ends with 3; int divisor=1; printf(1); while( divisor != 0 ) { printf(1); divisor = 10 * (divisor % n) + 1; } printf(\n); Dave On Friday, September 21, 2012 2:05:55 AM UTC-5, Navin Kumar wrote: @Dave sir: Thanx for reply. your solution gives the exact multiple like 37 for 3, 8547 for 13. In the question i think we have to print the number which is 13x8547 which will be very large (out of integer range).In that case we have to store result in string. On Fri, Sep 21, 2012 at 12:09 PM, Dave dave_an...@juno.com wrote: @Navin: It means that given a positive integer n whose decimal representation ends in 3, find a multiple, m*n, which is written solely with the digit 1. E.g., 3: 37 * 3 = 111; 13: 8547 * 13 = 111,111. Dave On Thursday, September 20, 2012 11:56:08 PM UTC-5, Navin Kumar wrote: @all: Please explain question number 8. I am not getting the question exactly what it says ? On Fri, Sep 21, 2012 at 9:30 AM, Dave dave_an...@juno.com wrote: @Bharat: Simulate long division, dividing a number ...1 by the number. You can do this one digit at a time, printing the quotient digit by digit until you bring down a zero. It could look something like this: int n=the number that ends with 3; int divisor=1; while( divisor n ) divisor = 10 * divisor + 1; while( divisor != 0 ) { printf(%d,divisor / n); divisor = 10 * (divisor % n) + 1; } printf(\n); Dave On Thursday, September 20, 2012 9:45:55 PM UTC-5, bharat wrote: what is the solution(not brute force) for 8th question ? On Fri, Sep 14, 2012 at 5:19 PM, Bhupendra Dubey bhupen...@gmail.com wrote: Which edition of barron? On Wed, Sep 28, 2011 at 6:05 PM, VIHARRI vihar...@gmail.com wrote: 1. Java uses stack for byte code in JVM - each instruction is of one byte, so how many such instructions are possible in an operating system. 2. Three processes p1, p2, p3, p4 - each have sizes 1GB, 1.2GB, 2GB, 1GB. And each processes is executed as a time sharing fashion. Will they be executed on an operating system. 3. write a recursive program for reversing the linked list. 4. write a program for checking the given number is a palindrome. ( dont use string / array for converting number ). 5. write a recursive program for multiplying two numbers a and b, with additions. The program should take care of doing min # additions as that of which ever number is lower between a and b. 6. There are two sets A and B with n integers, write a program to check the whether there exists two numbers a in A and b in B such that a+b = val ( val is given ); 7. write a program to return the row number which has max no of one's in an array of NxN matrix where all 1's occur before any 0's starts. 8. For every number that has 3 in its units place has one multiple which has all one's i.e. 111 is such multiple and 13 has a multiple 11. Write a program to find such multiple for any number that has 3 at its units place. 9. what are the maximum no of edges that can be connected in a graph of n vertices and 0 edges such that after adding edges given graph is still disconnected. 10. One Question on critical section. For Analytical Test - Prepare the Questions in the barrons book of sample paper - 2 ( they have give two passages ) -- 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=enhttp://groups.google.com/group/algogeeks?hl=en . -- Thanks regards Bhupendra -- 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=enhttp://groups.google.com/group/algogeeks?hl=en . -- 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/-/pDBPxDR3R1oJhttps://groups.google.com/d/msg/algogeeks/-/pDBPxDR3R1oJ . To post to this group, send email to algo...@googlegroups.com. To unsubscribe from this group, send email to
Re: [algogeeks] Adobe Written Test - 25 SEPT 2010
@Rahul: What does this print for n = 193? Dave On Friday, September 21, 2012 12:14:18 AM UTC-5, Rahul Kumar Patle wrote: here is my code: main() { int n=13; int divisor=1; int temp; while( divisor n ) divisor = 10 * divisor + 1; printf(%d\n , divisor); temp = divisor; while(n) { if(temp%n == 0) break; temp = 10 * (temp % n) + 1; divisor = 10 * divisor + 1; while( temp n ) { divisor = 10 * divisor + 1; temp = 10 * temp + 1; } printf(%d and %d\n , divisor, temp); } printf(%d\n, divisor); } On Fri, Sep 21, 2012 at 10:30 AM, Rahul Kumar Patle patlera...@gmail.comjavascript: wrote: @navin: you have to find a number containing all 1's which is divisible by a given number xx...3, here given number contains 3 at it unit place... On Fri, Sep 21, 2012 at 10:25 AM, Navin Kumar algorit...@gmail.comjavascript: wrote: @all: Please explain question number 8. I am not getting the question exactly what it says ? On Fri, Sep 21, 2012 at 9:30 AM, Dave dave_an...@juno.com javascript: wrote: @Bharat: Simulate long division, dividing a number ...1 by the number. You can do this one digit at a time, printing the quotient digit by digit until you bring down a zero. It could look something like this: int n=the number that ends with 3; int divisor=1; while( divisor n ) divisor = 10 * divisor + 1; while( divisor != 0 ) { printf(%d,divisor / n); divisor = 10 * (divisor % n) + 1; } printf(\n); Dave On Thursday, September 20, 2012 9:45:55 PM UTC-5, bharat wrote: what is the solution(not brute force) for 8th question ? On Fri, Sep 14, 2012 at 5:19 PM, Bhupendra Dubey bhupen...@gmail.comwrote: Which edition of barron? On Wed, Sep 28, 2011 at 6:05 PM, VIHARRI vihar...@gmail.com wrote: 1. Java uses stack for byte code in JVM - each instruction is of one byte, so how many such instructions are possible in an operating system. 2. Three processes p1, p2, p3, p4 - each have sizes 1GB, 1.2GB, 2GB, 1GB. And each processes is executed as a time sharing fashion. Will they be executed on an operating system. 3. write a recursive program for reversing the linked list. 4. write a program for checking the given number is a palindrome. ( dont use string / array for converting number ). 5. write a recursive program for multiplying two numbers a and b, with additions. The program should take care of doing min # additions as that of which ever number is lower between a and b. 6. There are two sets A and B with n integers, write a program to check the whether there exists two numbers a in A and b in B such that a+b = val ( val is given ); 7. write a program to return the row number which has max no of one's in an array of NxN matrix where all 1's occur before any 0's starts. 8. For every number that has 3 in its units place has one multiple which has all one's i.e. 111 is such multiple and 13 has a multiple 11. Write a program to find such multiple for any number that has 3 at its units place. 9. what are the maximum no of edges that can be connected in a graph of n vertices and 0 edges such that after adding edges given graph is still disconnected. 10. One Question on critical section. For Analytical Test - Prepare the Questions in the barrons book of sample paper - 2 ( they have give two passages ) -- 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=enhttp://groups.google.com/group/algogeeks?hl=en . -- Thanks regards Bhupendra -- 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=enhttp://groups.google.com/group/algogeeks?hl=en . -- 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/-/pDBPxDR3R1oJ. To post to this group, send email to algo...@googlegroups.comjavascript: . To unsubscribe from this group, send email to algogeeks+...@googlegroups.com javascript:. 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.comjavascript: . To unsubscribe from this group, send email to algogeeks+...@googlegroups.com javascript:.
Re: [algogeeks] Adobe Written Test - 25 SEPT 2010
what is the solution(not brute force) for 8th question ? On Fri, Sep 14, 2012 at 5:19 PM, Bhupendra Dubey bhupendra@gmail.comwrote: Which edition of barron? On Wed, Sep 28, 2011 at 6:05 PM, VIHARRI viharri@gmail.com wrote: 1. Java uses stack for byte code in JVM - each instruction is of one byte, so how many such instructions are possible in an operating system. 2. Three processes p1, p2, p3, p4 - each have sizes 1GB, 1.2GB, 2GB, 1GB. And each processes is executed as a time sharing fashion. Will they be executed on an operating system. 3. write a recursive program for reversing the linked list. 4. write a program for checking the given number is a palindrome. ( dont use string / array for converting number ). 5. write a recursive program for multiplying two numbers a and b, with additions. The program should take care of doing min # additions as that of which ever number is lower between a and b. 6. There are two sets A and B with n integers, write a program to check the whether there exists two numbers a in A and b in B such that a+b = val ( val is given ); 7. write a program to return the row number which has max no of one's in an array of NxN matrix where all 1's occur before any 0's starts. 8. For every number that has 3 in its units place has one multiple which has all one's i.e. 111 is such multiple and 13 has a multiple 11. Write a program to find such multiple for any number that has 3 at its units place. 9. what are the maximum no of edges that can be connected in a graph of n vertices and 0 edges such that after adding edges given graph is still disconnected. 10. One Question on critical section. For Analytical Test - Prepare the Questions in the barrons book of sample paper - 2 ( they have give two passages ) -- 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 Bhupendra -- 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] Adobe Written Test - 25 SEPT 2010
@Bharat: Simulate long division, dividing a number ...1 by the number. You can do this one digit at a time, printing the quotient digit by digit until you bring down a zero. It could look something like this: int n=the number that ends with 3; int divisor=1; while( divisor n ) divisor = 10 * divisor + 1; while( divisor != 0 ) { printf(%d,divisor / n); divisor = 10 * (divisor % n) + 1; } printf(\n); Dave On Thursday, September 20, 2012 9:45:55 PM UTC-5, bharat wrote: what is the solution(not brute force) for 8th question ? On Fri, Sep 14, 2012 at 5:19 PM, Bhupendra Dubey bhupen...@gmail.comjavascript: wrote: Which edition of barron? On Wed, Sep 28, 2011 at 6:05 PM, VIHARRI vihar...@gmail.comjavascript: wrote: 1. Java uses stack for byte code in JVM - each instruction is of one byte, so how many such instructions are possible in an operating system. 2. Three processes p1, p2, p3, p4 - each have sizes 1GB, 1.2GB, 2GB, 1GB. And each processes is executed as a time sharing fashion. Will they be executed on an operating system. 3. write a recursive program for reversing the linked list. 4. write a program for checking the given number is a palindrome. ( dont use string / array for converting number ). 5. write a recursive program for multiplying two numbers a and b, with additions. The program should take care of doing min # additions as that of which ever number is lower between a and b. 6. There are two sets A and B with n integers, write a program to check the whether there exists two numbers a in A and b in B such that a+b = val ( val is given ); 7. write a program to return the row number which has max no of one's in an array of NxN matrix where all 1's occur before any 0's starts. 8. For every number that has 3 in its units place has one multiple which has all one's i.e. 111 is such multiple and 13 has a multiple 11. Write a program to find such multiple for any number that has 3 at its units place. 9. what are the maximum no of edges that can be connected in a graph of n vertices and 0 edges such that after adding edges given graph is still disconnected. 10. One Question on critical section. For Analytical Test - Prepare the Questions in the barrons book of sample paper - 2 ( they have give two passages ) -- 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.comjavascript: . To unsubscribe from this group, send email to algogeeks+...@googlegroups.com javascript:. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Thanks regards Bhupendra -- 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.comjavascript: . To unsubscribe from this group, send email to algogeeks+...@googlegroups.com javascript:. 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 view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/pDBPxDR3R1oJ. 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] Adobe Written Test - 25 SEPT 2010
@all: Please explain question number 8. I am not getting the question exactly what it says ? On Fri, Sep 21, 2012 at 9:30 AM, Dave dave_and_da...@juno.com wrote: @Bharat: Simulate long division, dividing a number ...1 by the number. You can do this one digit at a time, printing the quotient digit by digit until you bring down a zero. It could look something like this: int n=the number that ends with 3; int divisor=1; while( divisor n ) divisor = 10 * divisor + 1; while( divisor != 0 ) { printf(%d,divisor / n); divisor = 10 * (divisor % n) + 1; } printf(\n); Dave On Thursday, September 20, 2012 9:45:55 PM UTC-5, bharat wrote: what is the solution(not brute force) for 8th question ? On Fri, Sep 14, 2012 at 5:19 PM, Bhupendra Dubey bhupen...@gmail.comwrote: Which edition of barron? On Wed, Sep 28, 2011 at 6:05 PM, VIHARRI vihar...@gmail.com wrote: 1. Java uses stack for byte code in JVM - each instruction is of one byte, so how many such instructions are possible in an operating system. 2. Three processes p1, p2, p3, p4 - each have sizes 1GB, 1.2GB, 2GB, 1GB. And each processes is executed as a time sharing fashion. Will they be executed on an operating system. 3. write a recursive program for reversing the linked list. 4. write a program for checking the given number is a palindrome. ( dont use string / array for converting number ). 5. write a recursive program for multiplying two numbers a and b, with additions. The program should take care of doing min # additions as that of which ever number is lower between a and b. 6. There are two sets A and B with n integers, write a program to check the whether there exists two numbers a in A and b in B such that a+b = val ( val is given ); 7. write a program to return the row number which has max no of one's in an array of NxN matrix where all 1's occur before any 0's starts. 8. For every number that has 3 in its units place has one multiple which has all one's i.e. 111 is such multiple and 13 has a multiple 11. Write a program to find such multiple for any number that has 3 at its units place. 9. what are the maximum no of edges that can be connected in a graph of n vertices and 0 edges such that after adding edges given graph is still disconnected. 10. One Question on critical section. For Analytical Test - Prepare the Questions in the barrons book of sample paper - 2 ( they have give two passages ) -- 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 http://groups.google.com/group/algogeeks?hl=en. -- Thanks regards Bhupendra -- 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 http://groups.google.com/group/algogeeks?hl=en. -- 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/-/pDBPxDR3R1oJ. 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] Adobe Written Test - 25 SEPT 2010
Which edition of barron? On Wed, Sep 28, 2011 at 6:05 PM, VIHARRI viharri@gmail.com wrote: 1. Java uses stack for byte code in JVM - each instruction is of one byte, so how many such instructions are possible in an operating system. 2. Three processes p1, p2, p3, p4 - each have sizes 1GB, 1.2GB, 2GB, 1GB. And each processes is executed as a time sharing fashion. Will they be executed on an operating system. 3. write a recursive program for reversing the linked list. 4. write a program for checking the given number is a palindrome. ( dont use string / array for converting number ). 5. write a recursive program for multiplying two numbers a and b, with additions. The program should take care of doing min # additions as that of which ever number is lower between a and b. 6. There are two sets A and B with n integers, write a program to check the whether there exists two numbers a in A and b in B such that a+b = val ( val is given ); 7. write a program to return the row number which has max no of one's in an array of NxN matrix where all 1's occur before any 0's starts. 8. For every number that has 3 in its units place has one multiple which has all one's i.e. 111 is such multiple and 13 has a multiple 11. Write a program to find such multiple for any number that has 3 at its units place. 9. what are the maximum no of edges that can be connected in a graph of n vertices and 0 edges such that after adding edges given graph is still disconnected. 10. One Question on critical section. For Analytical Test - Prepare the Questions in the barrons book of sample paper - 2 ( they have give two passages ) -- 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 Bhupendra -- 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] Adobe Written Test - 25 SEPT 2010
1. Java uses stack for byte code in JVM - each instruction is of one byte, so how many such instructions are possible in an operating system. 2. Three processes p1, p2, p3, p4 - each have sizes 1GB, 1.2GB, 2GB, 1GB. And each processes is executed as a time sharing fashion. Will they be executed on an operating system. 3. write a recursive program for reversing the linked list. 4. write a program for checking the given number is a palindrome. ( dont use string / array for converting number ). 5. write a recursive program for multiplying two numbers a and b, with additions. The program should take care of doing min # additions as that of which ever number is lower between a and b. 6. There are two sets A and B with n integers, write a program to check the whether there exists two numbers a in A and b in B such that a+b = val ( val is given ); 7. write a program to return the row number which has max no of one's in an array of NxN matrix where all 1's occur before any 0's starts. 8. For every number that has 3 in its units place has one multiple which has all one's i.e. 111 is such multiple and 13 has a multiple 11. Write a program to find such multiple for any number that has 3 at its units place. 9. what are the maximum no of edges that can be connected in a graph of n vertices and 0 edges such that after adding edges given graph is still disconnected. 10. One Question on critical section. For Analytical Test - Prepare the Questions in the barrons book of sample paper - 2 ( they have give two passages ) -- 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.