标签:子序列 lse controls com none solution info first rip
class Solution { public: bool increasingTriplet(vector<int>& nums) { //使用双指针; int len=nums.size(); if(len<2) return false; int first=INT_MAX,second=INT_MAX; for(auto n: nums){ if(n<=first) first=n; else if(n<=second) second=n; else return true; } return false; } };
标签:子序列 lse controls com none solution info first rip
原文地址:https://www.cnblogs.com/joelwang/p/11896826.html