title: Lexicographically Minimum String Rotation
signature: function lexicographicallyMinimumStringRotation($str_) {
test_code: <?php
  
  
  // SOLUTION CODE 
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function validateSolution($actual, $expected){
      return serialize($actual) == serialize($expected);
  }
  
  function driver($str_, $expected){
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME($str_), $expected)){
          return "PASSED";
        }
        return "FAILED";
      }
      catch (Exception $exception_obj) {
        return get_class($exception_obj);
      }
  }
  
  function main(){
      printf("TEST-0...%s\n",driver(
        "onWEchl", 
        "EchlonW"));
      
      printf("TEST-1...%s\n",driver(
        "2", 
        "2"));
      
      printf("TEST-2...%s\n",driver(
        "100", 
        "001"));
      
      printf("TEST-3...%s\n",driver(
        "GHbCZA", 
        "AGHbCZ"));
      
      printf("TEST-4...%s\n",driver(
        "50568798206105", 
        "05505687982061"));
      
      printf("TEST-5...%s\n",driver(
        "001011110001", 
        "000100101111"));
      
      printf("TEST-6...%s\n",driver(
        "lljpYhznnyu", 
        "Yhznnyulljp"));
      
      printf("TEST-7...%s\n",driver(
        "54499921759984", 
        "17599845449992"));
      
      printf("TEST-8...%s\n",driver(
        "11101", 
        "01111"));
      
      printf("TEST-9...%s\n",driver(
        "qvypgCYEjsyjwZ", 
        "CYEjsyjwZqvypg"));
      
  }
  
  main();
  ?>
source_py: def lexicographically_minimum_string_rotation(str_):
      n = len(str_)
      arr = ([0] * n)
      concat = (str_ + str_)
      for i in range(n):
          arr[i] = concat[i:(n + i)]
      arr.sort()
      return arr[0]
source_cpp: string lexicographically_minimum_string_rotation(string str) {
    int n = str . length ( );
    string arr [ n ];
    string concat = str + str;
    for ( int i = 0;
    i < n;
    i ++ ) arr [ i ] = concat . substr ( i, n );
    sort ( arr, arr + n );
    return arr [ 0 ];
  }