Introduced local best_index variable to avoid check for nullptr inside the loop as well as make the function similar to other minmax[_helper] functions
Introduced local best_index variable to avoid check for nullptr inside the loop as well as make the function similar to other minmax[_helper] functions

realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core