摘要:
class Solution { public: int fac[10]; void init() { fac[0]=1; fac[1]=1; for(int i=2;i<10;i++) fac[i]=fac[i-1]*i; return; } string str; bool visited[10 阅读全文
posted @ 2023-03-25 16:24
穿过雾的阴霾
阅读(16)
评论(0)
推荐(0)
摘要:
#递归 class Solution { public: ListNode* reverseList(ListNode* head) { if(head==NULL||head->next==NULL) return head; //先反转head后面的链表,最后将head接在新链表最后即可 aut 阅读全文
posted @ 2023-03-25 15:30
穿过雾的阴霾
阅读(13)
评论(0)
推荐(0)

浙公网安备 33010602011771号