Skip to content

Instantly share code, notes, and snippets.

@hhariri
Last active December 27, 2015 20:09
Show Gist options
  • Save hhariri/7382889 to your computer and use it in GitHub Desktop.
Save hhariri/7382889 to your computer and use it in GitHub Desktop.
fun topUSandUK_v1(albums: List<Album>): List<Album> {
val hits = arrayListOf<Album>()
for (i: Int in 0..albums.count()-1) {
if (albums[i].chartUK == 1 && albums[i].chartUS == 1) {
hits.add(albums[i])
}
}
return hits;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment