I have an NSArray of NSNumbers and want to find the maximum value in the array. Is there any built in functionality for doing so? I am using iOS4 GM if that makes any differ
NSArray * test= @[@3, @67, @23, @67, @67]; int maximumValue = [[test valueForKeyPath: @"@max.self"] intValue]; NSLog(@" MaximumValue = %d", maximumValue); // Maximum = 67