自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 资源 (4)
  • 收藏
  • 关注

原创 Implement Stack using Queues && Implement Queue using Stacks

Implement Stack using Queuesclass Stack {private: queueint> q;public: // Push element x onto stack. void push(int x) { queueint> t; while (!q.empty()) { t.p

2015-07-23 01:42:22 334

原创 Power of Two

class Solution {public: bool isPowerOfTwo(int n) { if (n < 1) return false; while (n > 2) { if (n % 2) return false; n = n/2; } return true

2015-07-23 01:03:22 314

原创 Maximum Gap

#1: sortO(nlogn)class Solution {public: int maximumGap(vectorint>& nums) { int n = nums.size(); if (n < 2) return 0; int res = 0; sort(nums.begin(), nums.end()

2015-07-21 14:44:16 268

原创 Summary Ranges

class Solution {public: string num2str(int num) { string res; int p = 0; long n = num; if (n < 0) { res.push_back('-'); p = 1;

2015-07-19 07:52:41 331

原创 Kth Smallest Element in a BST

/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */clas

2015-07-17 03:04:45 295

原创 Delete Node in a Linked List

/** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */void deleteNode(struct ListNode* node) { *node = *(node->next);}

2015-07-16 01:33:12 384

原创 Lowest Common Ancestor of a Binary Tree

BST:/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; *

2015-07-16 01:26:12 272

原创 Palindrome Linked List

#1 using stacktime: O(n); space O(n)/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */c

2015-07-14 15:34:25 357

原创 Rotate Array

class Solution {public: void rotate(vectorint>& nums, int k) { int n = nums.size(); if (k > n) k = k % n; if (n == k || k < 1) return; vectorint> temp(nums.begin(

2015-07-09 14:20:23 376

Cracking the Coding Interview

important book for coding interview, concluding interview suggestions, questions and solutions

2013-01-17

Distributed and Cloud Computing

By Kai Hwang Required book for course EE532 Famous reference in this area

2013-01-17

8086汇编语言指令表

8086汇编语言指令表 包括伪指令 中断向量号等

2011-03-15

汇编语言的学生信息管理系统

汇编语言的学生管理系统,可输入并显示学生姓名 班级 学号 成绩,对成绩进行排序,求平均值

2011-03-15

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除