摘要: 题目一 permutations 题目描述 Given a collection of numbers, return all possible permutations. For example,[1,2,3]have the following permutations:[1,2,3],[1,3 阅读全文
posted @ 2018-09-17 23:45 鸭子船长 阅读(260) 评论(0) 推荐(0)
摘要: You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Note: You have to rotate the image in-place, which 阅读全文
posted @ 2018-09-17 23:15 鸭子船长 阅读(993) 评论(0) 推荐(0)
摘要: 单链表的特点是:单向。设头结点位head,则最后一个节点的next指向NULL。如果只知道头结点head,请问怎么将该链表排序? 设结点结构为 struct Node{ int key; Node* next; }; 那么一般人见到这种题目,立马就会想到指针交换。是的,大家被指针交换的题目做多了,形 阅读全文
posted @ 2018-09-17 23:01 鸭子船长 阅读(418) 评论(0) 推荐(0)