Function
Just copy the test cases in leetcode to the local testcases.txt file, copy the Solution() class to the local main.cpp file, the main.cpp file can parse the input variables line by line, so as to realize the function of local debugging.
demo
Instructions
- Copy the Solution class to main.cpp
- Copy test case data to testcase.txt
- Define class member parameters, call parse(cin, …) to parse variables
- By default, cmake is used to compile, and the c++ standard requires c++17 and above
principle
Most of the functions for processing input data come from leetcode. Currently, the following data types are supported, and these types are acceptable for most test cases.
int
string
vector<int>
vector<vector<int>>
vector<string>
ListNode*
TreeNode*