File tree Expand file tree Collapse file tree 3 files changed +0
-60
lines changed
alg-cpp.xcodeproj/project.xcworkspace/xcuserdata/junl.xcuserdatad Expand file tree Collapse file tree 3 files changed +0
-60
lines changed Original file line number Diff line number Diff line change 3
3
uuid = " 6057182A-5432-40CB-A6E9-927652D280FB"
4
4
type = " 0"
5
5
version = " 2.0" >
6
- <Breakpoints >
7
- <BreakpointProxy
8
- BreakpointExtensionID = " Xcode.Breakpoint.FileBreakpoint" >
9
- <BreakpointContent
10
- uuid = " 913CEDB4-C9B6-42F9-95F7-02DCA02D2CBF"
11
- shouldBeEnabled = " Yes"
12
- ignoreCount = " 0"
13
- continueAfterRunningActions = " No"
14
- filePath = " ../alg-cpp/main.cpp"
15
- startingColumnNumber = " 9223372036854775807"
16
- endingColumnNumber = " 9223372036854775807"
17
- startingLineNumber = " 69"
18
- endingLineNumber = " 69"
19
- landmarkName = " reconstructQueue(people)"
20
- landmarkType = " 7" >
21
- </BreakpointContent >
22
- </BreakpointProxy >
23
- </Breakpoints >
24
6
</Bucket >
Original file line number Diff line number Diff line change @@ -69,51 +69,9 @@ class Solution {
69
69
return people;
70
70
}
71
71
};
72
- class Solution2 {
73
- public:
74
- bool canPartition (vector<int >& nums) {
75
- int sum = 0 ;
76
- for (auto &i : nums){
77
- sum+=i;
78
- }
79
- if (sum & 0x1 ){
80
- return false ;
81
- }
82
- int v = sum / 2 ;
83
- int idx = -1 ;
84
- helper2 (nums, idx, v);
85
- return st;
86
- }
87
- void helper2 (vector<int &> &nums,int idx, int sum){
88
- if (sum == 0 ){
89
- st = true ;
90
- return ;
91
- }
92
-
93
- for (int i=idx+1 ; i < nums.size ();i++){
94
- if (sum > nums[i]){
95
- helper2 (nums, i, sum - nums[i]);
96
- helper2 (nums, i, sum);
97
- }
98
- }
99
- }
100
- bool st;
101
- };
102
72
int main (int argc, const char * argv[]) {
103
73
// insert code here...
104
74
std::string s{" aabccccaab" };
105
75
std::cout << FilterRepeatString (s) << std::endl;
106
- Solution so;
107
- // string s2 = "3[a2[c]]";//"3[a2[c]]"
108
- // s2 = so.decodeString(s2);
109
- vector<vector<int >> r;
110
- r.insert (r.begin ()+2 , {1 });
111
- // r.push_back({7,0});
112
- // r.push_back({4,4});
113
- // r.push_back({7,1});
114
- // r.push_back({5,0});
115
- // r.push_back({6,1});
116
- // r.push_back({5,2});
117
- // so.reconstructQueue(r);
118
76
return 0 ;
119
77
}
You can’t perform that action at this time.
0 commit comments