摘要:
class Solution {public: ListNode *reverseKGroup(ListNode *head, int k) { if (k next = rhead; } last = rtail; } ... 阅读全文
摘要:
Givenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n.For example,Givenn= 3, your program should return all 5 uni... 阅读全文
摘要:
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and ... 阅读全文
摘要:
struct mystat { int idx; int cnt[26]; mystat(int id = 0) {idx = id;}};bool cmp(const mystat &a, const mystat &b) { for (int i=0; i b.cnt[i... 阅读全文