View Problem
Gather together corresponding elements from multiple lists
Given several lists, gather together the first element from every list, the second element from every list, and so on for all corresponding index values in the lists. E.g. for these three lists, first =
Submit a new solution for perl, java, or groovy
There are 17 other solutions in additional languages (clojure, cpp, csharp, erlang ...)
['Bruce', 'Tommy Lee', 'Bruce'], last = ['Willis', 'Jones', 'Lee'], years = [1955, 1946, 1940] the result should produce 3 actors. The middle actor should be Tommy Lee Jones.
java
String[] first = new String[]{"Bruce", "Tommy Lee", "Bruce"};
String[] last = new String[]{"Willis", "Jones", "Lee"};
String[] years = new String[]{"1955", "1946", "1940"};
List<String[]> list = new ArrayList<String[]>(); list.add(first); list.add(last); list.add(years);
String[] result = zip(",", list);
String[] last = new String[]{"Willis", "Jones", "Lee"};
String[] years = new String[]{"1955", "1946", "1940"};
List<String[]> list = new ArrayList<String[]>(); list.add(first); list.add(last); list.add(years);
String[] result = zip(",", list);
Submit a new solution for perl, java, or groovy
There are 17 other solutions in additional languages (clojure, cpp, csharp, erlang ...)




