title: Lexicographically Minimum String Rotation
signature: lexicographically_minimum_string_rotation <- function(str_) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(str_, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(str_), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          "onWEchl", 
          "EchlonW"
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          "2", 
          "2"
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          "100", 
          "001"
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          "GHbCZA", 
          "AGHbCZ"
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          "50568798206105", 
          "05505687982061"
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          "001011110001", 
          "000100101111"
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          "lljpYhznnyu", 
          "Yhznnyulljp"
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          "54499921759984", 
          "17599845449992"
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          "11101", 
          "01111"
      )))
  
      cat(sprintf("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 ];
  }