title: Lexicographically Minimum String Rotation
signature: function lexicographicallyMinimumStringRotation(str_: string): string {
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 ];
  }
question_info.test_list: [{"idx": 0, "outputs": "EchlonW", "inputs": {"str_": "onWEchl"}}, {"idx": 1, "outputs": "2", "inputs": {"str_": "2"}}, {"idx": 2, "outputs": "001", "inputs": {"str_": "100"}}, {"idx": 3, "outputs": "AGHbCZ", "inputs": {"str_": "GHbCZA"}}, {"idx": 4, "outputs": "05505687982061", "inputs": {"str_": "50568798206105"}}, {"idx": 5, "outputs": "000100101111", "inputs": {"str_": "001011110001"}}, {"idx": 6, "outputs": "Yhznnyulljp", "inputs": {"str_": "lljpYhznnyu"}}, {"idx": 7, "outputs": "17599845449992", "inputs": {"str_": "54499921759984"}}, {"idx": 8, "outputs": "01111", "inputs": {"str_": "11101"}}, {"idx": 9, "outputs": "CYEjsyjwZqvypg", "inputs": {"str_": "qvypgCYEjsyjwZ"}}]
question_info.entry_cls_name: Solution
question_info.test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value: any): string{
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual: string, expected: string): boolean {
      return convertToString(actual) === convertToString(expected);
  }
  
  function driver(str_: string, expected:string): string {
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(str_),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver("onWEchl", "EchlonW");
    console.log(`TEST-0...${result}`);
  
    result = driver("2", "2");
    console.log(`TEST-1...${result}`);
  
    result = driver("100", "001");
    console.log(`TEST-2...${result}`);
  
    result = driver("GHbCZA", "AGHbCZ");
    console.log(`TEST-3...${result}`);
  
    result = driver("50568798206105", "05505687982061");
    console.log(`TEST-4...${result}`);
  
    result = driver("001011110001", "000100101111");
    console.log(`TEST-5...${result}`);
  
    result = driver("lljpYhznnyu", "Yhznnyulljp");
    console.log(`TEST-6...${result}`);
  
    result = driver("54499921759984", "17599845449992");
    console.log(`TEST-7...${result}`);
  
    result = driver("11101", "01111");
    console.log(`TEST-8...${result}`);
  
    result = driver("qvypgCYEjsyjwZ", "CYEjsyjwZqvypg");
    console.log(`TEST-9...${result}`);
  
  };
  
  main();
question_info.extension: ts
question_info.entry_fn_name: lexicographicallyMinimumStringRotation
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: tsc --target es2020 --lib es5,dom,es2015,es2020 __FILENAME__
question_info.commands: node __FILENAME__.js