/** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : val(x), next(nullptr) {} * }; */ #include <cstddef> #include <stack> using namespace std; class Solution { public: ListNode* addInList(ListNode* head1, ListNode* head2) { stack<int> a, b; // 将链表节点值压入栈中 ...