You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to byu-cs-jm-1...@googlegroups.com
For 20.6 are we supposed to mutate the elements of the array to the average values and return void, or are we supposed to make a new array and return that?
Jay McCarthy
unread,
Dec 5, 2011, 12:38:49 AM12/5/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to byu-cs-jm-1...@googlegroups.com
"it takes an array of prices and replaces the values with their moving averages."
On Sun, Dec 4, 2011 at 10:36 PM, Colin Thompson <thom...@gmail.com> wrote:
For 20.6 are we supposed to mutate the elements of the array to the average values and return void, or are we supposed to make a new array and return that?
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to byu-cs-jm-1...@googlegroups.com
Are we allowed to make a new array to help us that we do not return?
Jay McCarthy
unread,
Dec 5, 2011, 12:46:28 AM12/5/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to byu-cs-jm-1...@googlegroups.com
I guess, although I can't think of why that would be useful. Take what you did in #5 and convert it to a while loop with mutation and array rather than a list. There's no intermediate array there. Also, you can't really make new arrays you're stuck with the ones you start with.