Post Reply 
Programming puzzles: processing lists!
04-20-2017, 06:48 PM (This post was last modified: 04-20-2017 06:51 PM by Han.)
Post: #8
RE: Programming puzzles: processing lists!
(04-20-2017 05:42 PM)pier4r Wrote:  @han a question. If I read your code properly your solutions are of the variant #1 right? You are not exploding/transforming the list in other collections if I am not mistaken, correct?

Correct. The input lists are kept as lists. If the input list is modified, only its elements are modified (i.e. the input list is modified and returned as the output list). Otherwise, a newly created list is returned as the output. There is no transformation of any list into some other object type or structure.

I deviated from your instructions slightly in that when a list is "valid" I return a 1 (as opposed to the original list), although such a desired output can be easily achieved by changing the return statement to return the original list.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: Programming puzzles: processing lists! - Han - 04-20-2017 06:48 PM

User(s) browsing this thread: 1 Guest(s)