Print a case where the given sorting algorithm fails | C ++ program to find a case where the given algorithm fails ; Function to print a case where the given sorting algorithm fails ; only case where it fails ; Driver Code
#include <bits/stdc++.h> NEW_LINE using namespace std ; void printCase ( int n ) { if ( n <= 2 ) { cout << -1 ; return ; } for ( int i = n ; i >= 1 ; i -- ) cout << i << " ▁ " ; } int main ( ) { int n = 3 ; printCase ( n ) ; return 0 ; }