title: Program Find String Start End Geeks
signature: bool programFindStringStartEndGeeks(string str, string corner) {
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(bool actual, bool expected){
      return actual == expected;
  }
  
  string driver(string str, string corner, bool expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(str, corner), 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("geeksmanishgeeks", "geeks", true); 
      cout << "TEST-" << 0 << "..."
           <<  result
           << "\n";
  
      result = driver("shreyadhatwalia", "abc", false); 
      cout << "TEST-" << 1 << "..."
           <<  result
           << "\n";
  
      result = driver("10000100", "100", true); 
      cout << "TEST-" << 2 << "..."
           <<  result
           << "\n";
  
      result = driver("abaa", "a", true); 
      cout << "TEST-" << 3 << "..."
           <<  result
           << "\n";
  
      result = driver("30645530", "30", true); 
      cout << "TEST-" << 4 << "..."
           <<  result
           << "\n";
  
      result = driver("0000011011001", "001", false); 
      cout << "TEST-" << 5 << "..."
           <<  result
           << "\n";
  
      result = driver("dkqEd", "d", true); 
      cout << "TEST-" << 6 << "..."
           <<  result
           << "\n";
  
      result = driver("48694119324654", "654", false); 
      cout << "TEST-" << 7 << "..."
           <<  result
           << "\n";
  
      result = driver("1101010010", "11", false); 
      cout << "TEST-" << 8 << "..."
           <<  result
           << "\n";
  
      result = driver("Ks", "KsFLmngGGOmHKs", false); 
      cout << "TEST-" << 9 << "..."
           <<  result
           << "\n";
  
      return 0;
  }
source_py: def program_find_string_start_end_geeks(str, corner):
      n = len(str)
      cl = len(corner)
      if (n < cl):
          return False
      return ((str[:cl] == corner) and (str[(n - cl):] == corner))
source_cpp: bool program_find_string_start_end_geeks(string str, string corner) {
    int n = str . length ( );
    int cl = corner . length ( );
    if ( n < cl ) return false;
    return ( str . substr ( 0, cl ) . compare ( corner ) == 0 && str . substr ( n - cl, cl ) . compare ( corner ) == 0 );
  }