Lists and Tuples

What's a Tuple

A Tuple is a fixed length collection of elements. Unlike Lists, a tuple can mix types. The type of the tuple depends on the types of its elements. Thus a

(Int, String)

is a different type from a

(String, Int)

is different from a

(Int, String, String, String)

Problems

Problem 10 - Find runs in a list.

Problem 11 - Run length encode a list with tuples.

Problem 12 - Decode run lengths.

Problem 14 - Duplicate elements of a list.

Problem 15 - Replicate elements a given number of times.

Problem 16 - Drop every nth element from a list.

Problem 17 - Split a list into two lists.

Problem 18 - Extract a sublist.

Problem 19 - Rotate the elements in a list.

Problem 20 - Remove the element at a specified index.

Problem 21 - Insert an element at a specified index.

Problem 22 - Create a list of integers in a specified range.

results matching ""

    No results matching ""