Advertisement
Guest User

Untitled

a guest
Nov 29th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. #include <cstring>
  2. #include <cstdio>
  3.  
  4. bool isOrdered(const char *const *const data, const size_t size) {
  5.     for (int i = 0; i < size - 1; ++i) {
  6.         if (strcmp(data[i], data[i + 1]) >= 0) {
  7.             return false;
  8.         }
  9.     }
  10.    
  11.     return true;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement