title: Lexicographically Minimum String Rotation
signature: string lexicographicallyMinimumStringRotation(string str_) {
test_code: #include <algorithm>
  #include <assert.h>
  #include <cstdlib>
  #include <iostream>
  #include <map>
  #include <set>
  #include <string>
  #include <tuple> 
  #include <unordered_map>
  #include <vector>
  #include <math.h>
  #include <cmath>
  #include <bits/stdc++.h>
  #include <numeric>
  #include <functional>
  
  using namespace std;
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(string actual, string expected){
      return actual == expected;
  }
  
  string driver(string str_, string expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(str_), expected)){
              return "PASSED";
          }
          return "FAILED";
      }
      catch (const std::overflow_error& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (const std::runtime_error& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (const std::exception& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (...)
      {
          return "UNK_ERROR";
      }
  }
  
  int main() {
      string result = "";
  
      result = driver("onWEchl", "EchlonW"); 
      cout << "TEST-" << 0 << "..."
           <<  result
           << "\n";
  
      result = driver("2", "2"); 
      cout << "TEST-" << 1 << "..."
           <<  result
           << "\n";
  
      result = driver("100", "001"); 
      cout << "TEST-" << 2 << "..."
           <<  result
           << "\n";
  
      result = driver("GHbCZA", "AGHbCZ"); 
      cout << "TEST-" << 3 << "..."
           <<  result
           << "\n";
  
      result = driver("50568798206105", "05505687982061"); 
      cout << "TEST-" << 4 << "..."
           <<  result
           << "\n";
  
      result = driver("001011110001", "000100101111"); 
      cout << "TEST-" << 5 << "..."
           <<  result
           << "\n";
  
      result = driver("lljpYhznnyu", "Yhznnyulljp"); 
      cout << "TEST-" << 6 << "..."
           <<  result
           << "\n";
  
      result = driver("54499921759984", "17599845449992"); 
      cout << "TEST-" << 7 << "..."
           <<  result
           << "\n";
  
      result = driver("11101", "01111"); 
      cout << "TEST-" << 8 << "..."
           <<  result
           << "\n";
  
      result = driver("qvypgCYEjsyjwZ", "CYEjsyjwZqvypg"); 
      cout << "TEST-" << 9 << "..."
           <<  result
           << "\n";
  
      return 0;
  }
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 ];
  }