add: desc

This commit is contained in:
Eatswap 2022-10-24 12:22:28 +08:00
parent 53ad6bab78
commit 5341fdda8f
Signed by: Eatswap
GPG Key ID: BE661106A1F3FA0B
1 changed files with 11 additions and 0 deletions

View File

@ -1,6 +1,17 @@
#include <vector> #include <vector>
#include <iostream> #include <iostream>
/**
* 915. Partition Array into Disjoint Intervals
*
* Given an integer array nums, partition it into two (contiguous) subarrays left and right so that:
* - Every element in left is less than or equal to every element in right.
* - left and right are non-empty.
* - left has the smallest possible size.
* Return the length of left after such a partitioning.
* Test cases are generated such that partitioning exists.
*/
class Solution { class Solution {
private: private:
static int partitionDisjoint_1(const std::vector<int>& nums) { static int partitionDisjoint_1(const std::vector<int>& nums) {