Edited by luxpriy, 26 May 2010 - 09:58 AM.
Need help - please provide c# code or logic for below questions
Started by luxpriy, May 24 2010 10:00 PM
3 replies to this topic
#1
Posted 24 May 2010 - 10:00 PM
hiiiii
|
|
|
#2
Posted 25 May 2010 - 04:23 AM
You should really do your homework yourself. But I can help get you pointed in the right direction for a few of these.
For 1, 3, 4, 5, 8, use stacks
For 2, store the characters in two arrays, keep a counter, compare the most recent letter entered, if it differs, return the array of characters from [0] to [counter - 1]
for 6, use the formula 2^(p-1) * (2^p - 1), where p is a prime number
for 7, there are probably a lot of different ways, but one is to just store them in arrays of size 2, then add the numbers of corresponding subscripts together, storing the results in another array of size 2. Use the '/' for a delimiter when reading the input.
for 9, I have no idea what you're asking. Are you wanting to draw the line?
for 10, sort the array, loop through, compare the numbers to a counter. When the counter differs, then that's your missing number.
for 11, google "postfix infix". It's the first result. It uses a stack too. Surprise! It really aggravates me that you didn't at least try google, so I'm gonna stop posting advice. But, since I went through the effort of posting the first few, you can have them.
For 1, 3, 4, 5, 8, use stacks
For 2, store the characters in two arrays, keep a counter, compare the most recent letter entered, if it differs, return the array of characters from [0] to [counter - 1]
for 6, use the formula 2^(p-1) * (2^p - 1), where p is a prime number
for 7, there are probably a lot of different ways, but one is to just store them in arrays of size 2, then add the numbers of corresponding subscripts together, storing the results in another array of size 2. Use the '/' for a delimiter when reading the input.
for 9, I have no idea what you're asking. Are you wanting to draw the line?
for 10, sort the array, loop through, compare the numbers to a counter. When the counter differs, then that's your missing number.
for 11, google "postfix infix". It's the first result. It uses a stack too. Surprise! It really aggravates me that you didn't at least try google, so I'm gonna stop posting advice. But, since I went through the effort of posting the first few, you can have them.
#3
Posted 25 May 2010 - 08:55 AM
Bunch ok Geeks !! what you think people are slaves here.get me the code you have done first then let me see whether to help you or not to :D
#4
Posted 29 May 2010 - 12:09 AM
dude where is your code, show us what you have so we know how you understand


Sign In
Create Account

Back to top









