Engaged employer
Write a function to find elements that repeat a given N times in a given L list.
Anonymous
NSArray *mylist = @[@"Mohamed",@"Ali",@"Mohsen",@"Mohamed",@"Ali",@"Mohamed"]; NSCountedSet *countedSet = [[NSCountedSet alloc] initWithArray:mylist]; for(NSNumber * item in countedSet) NSLog(@"%@ %u", item, [countedSet countForObject:item]);
Check out your Company Bowl for anonymous work chats.