There are a total of n courses you have to take, labeled from 0 to n-1. Some courses may have prerequisites, for example to take course 0 you have to ...
分类:
其他好文 时间:
2020-02-03 13:33:02
阅读次数:
57
Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longestpath betwee ...
分类:
其他好文 时间:
2020-02-01 11:02:57
阅读次数:
105
1)升级出问题,ssh登录系统显示 -bash: warning: setlocale: LC_CTYPE: cannot change locale (zh_CN.UTF-8): No such file or directory -bash: warning: setlocale: LC_COL ...
分类:
系统相关 时间:
2020-02-01 00:25:24
阅读次数:
109
Given a string S, check if the letters can be rearranged so that two characters that are adjacent to each other are not the same. If possible, output ...
分类:
其他好文 时间:
2020-01-31 14:18:49
阅读次数:
60
Given a binary search tree and a node in it, find the in-order successor of that node in the BST. The successor of a node p is the node with the small ...
分类:
其他好文 时间:
2020-01-30 12:39:54
阅读次数:
54
Given a non-empty binary search tree and a target value, find the value in the BST that is closest to the target. Note: Given target value is a floati ...
分类:
其他好文 时间:
2020-01-30 12:32:09
阅读次数:
67
There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided input is the start and end coordinates of the hor ...
分类:
其他好文 时间:
2020-01-27 09:40:50
阅读次数:
81
简单的切换系统语言, 并不能很好的支持中文, 比如wps, 永中office等无法输入中文. 首先, 修改配置. kagome@kagome-pc:~$ sudo vi /etc/environment 追加如下内容: export LC_CTYPE="zh_CN.UTF-8" export LC_ ...
分类:
系统相关 时间:
2020-01-24 00:16:55
阅读次数:
113
主席树 学了主席树,用来求区间上的第k小 写一下自己整理后的模板 求区间第k小 include using namespace std; //poi2014 const int maxn = 500001; struct node{ int v,lc,rc; }T[maxn 21]; int n,m ...
分类:
其他好文 时间:
2020-01-22 21:37:27
阅读次数:
81
You are given a list of non-negative integers, a1, a2, ..., an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose o ...
分类:
其他好文 时间:
2020-01-20 09:38:14
阅读次数:
92