1. Find the Kth element of an array/list.
IE: kth_element({1,4,
9,3,5},3) =
9
More 
Solved By:

FlooD

Flacko

BlazingEyed
2. Find the last element of an array/list.
IE: last({1,4,9,3,
5}) =
5
More 
Solved By:

FlooD

Flacko

BlazingEyed
3. Find the second to last element of an array/list.
IE: second_last({1,4,9,
3,5}) =
3
More 
Solved By:

FlooD

Flacko

BlazingEyed
4. Find the number of elements in an array/list
IE: length({1,4,9,3,5}) = 5
More 
Solved By:

FlooD

Flacko

BlazingEyed
5. Reverse an array/list
IE: reverse({1,4,9,3,5}) = {5,4,9,4,1}
More 
Solved By:

FlooD

Flacko

BlazingEyed
6. Find out whether a list is a Palindrome or not.
IE: pal({1,4,9,4,1}) = true
IE: pal({1,4,9,
3,1}) = false
More 
Solved By:

FlooD

Flacko

BlazingEyed
7. Flatten a nested list
IE: flatten({1,4,{9,{3}},5}) = {1,4,9,3,5}
More 
Solved By:

Flacko

BlazingEyed
8. Eliminate duplicates from a list
IE: unique({1,4,3,3,3,5}) = {1,4,3,5} <= order is preserved
More 
Solved By:

FlooD

BlazingEyed
9. Group consecutive duplicates together in a list
IE: group_dups({1,4,3,3,3,5}) = {1,4,{3,3,3},5}
IE: group_dups({1,3,4,3,3,5}) = {1,3,4,{3,3},5} <= first 3 is separate from the other 3's.
More 
Solved By:

Flacko

BlazingEyed
10. Use the function from problem 9, but instead of grouping the duplicates together, create a new list with the element along with the number of times the element was duplicated by.
(This is a commonly used compression technique ;))
IE: compress({1,4,3,3,5}) = {1,4,{3,2},5}
IE: compress({1,1,1,4,4,3,3,3,3,5}) = {{1,3},{4,2},{3,4},5}}
More 
Solved By:

Flacko

BlazingEyed