title: Minimum Rotations Required Get String
signature: func minimumRotationsRequiredGetString(str string) int {
test_code: package main
  
  import (
      "fmt"
      "reflect"
      "math"
      "sort"
  )
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  func validateSolution(actual int, expected int) bool {
      return reflect.DeepEqual(actual,expected)
  }
  
  func driver(str string, expected int) string {
      if validateSolution(PLACEHOLDER_FN_NAME(str),expected) {
              return "PASSED"
      }
      return "FAILED"
  
  }
  
  func main() {
  
      // Use imports to avoid undefined errors
      var _ = reflect.DeepEqual
      _ = math.Abs
      _ = sort.Sort
      result := ""
      result = driver("vdevdNdQSopPtj", 14)
      fmt.Printf("TEST-0...%s\n", result)
      
      result = driver("5", 1)
      fmt.Printf("TEST-1...%s\n", result)
      
      result = driver("100010101011", 12)
      fmt.Printf("TEST-2...%s\n", result)
      
      result = driver("tlDOvJHAyMllu", 13)
      fmt.Printf("TEST-3...%s\n", result)
      
      result = driver("06", 2)
      fmt.Printf("TEST-4...%s\n", result)
      
      result = driver("101", 3)
      fmt.Printf("TEST-5...%s\n", result)
      
      result = driver("DYgtU", 5)
      fmt.Printf("TEST-6...%s\n", result)
      
      result = driver("4", 1)
      fmt.Printf("TEST-7...%s\n", result)
      
      result = driver("00", 2)
      fmt.Printf("TEST-8...%s\n", result)
      
      result = driver("Dt", 2)
      fmt.Printf("TEST-9...%s\n", result)
      
          
  }
source_py: def minimum_rotations_required_get_string(str):
      tmp = (str + str)
      n = len(str)
      for i in range(1, (n + 1)):
          substring = tmp[i:n]
          if (str == substring):
              return i
      return n
source_cpp: int minimum_rotations_required_get_string(string str) {
    string tmp = str + str;
    int n = str . length ( );
    for ( int i = 1;
    i <= n;
    i ++ ) {
      string substring = tmp . substr ( i, str . size ( ) );
      if ( str == substring ) return i;
    }
    return n;
  }