diff options
Diffstat (limited to 'other/partition_min_binary_array.cpp')
-rw-r--r-- | other/partition_min_binary_array.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/other/partition_min_binary_array.cpp b/other/partition_min_binary_array.cpp deleted file mode 100644 index 8cec267..0000000 --- a/other/partition_min_binary_array.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include "leetcode.h" - -class Solution { -public: - int minPartitions(string n) { - char ans = '0'; - for (char c : n) - if (c > ans) - ans = c; - return ans - '0'; - } -}; - -int main() { - Solution obj; - string n = "32"; - cout << obj.minPartitions(n); -} |