- 博客(8)
- 收藏
- 关注
原创 2020-10-22/530. 二叉搜索树的最小绝对差
思路一:中序遍历 得到升序数组,遍历得到min思路二:中序遍历 的过程中用pre记录前一个结点的值,不需要创建数组。顺便复习一下前中后序遍历#思路一class Solution {public: int getMinimumDifference(TreeNode* root) { if(root==NULL) return -1; stack<TreeNode*> call; if(root) ..
2020-10-12 13:17:22
82
原创 SQLZOO答案6:More_JOIN_operations/zh
/More_JOIN_operations/zhSELECT id,title FROM movie WHERE yr=1962select yr FROM movie WHERE title='Citizen Kane'select id,title,yr from movie where title like 'Star Trek%' order by yrselect title from movie where id in(11768, 1195..
2020-09-15 09:29:08
163
原创 SQLZOO答案5:The_JOIN_operation/zh
The_JOIN_operation/zhSELECT matchid,player FROM goal WHERE teamid = 'GER'SELECT id,stadium,team1,team2 FROM game where id=1012select a.player,a.teamid,b.stadium,b.mdatefrom goal as aleft join game as bon a.matchid = b.idwhere..
2020-09-14 14:30:16
173
原创 SQLZ00答案4:SUM_and_COUNT/zh
SUM_and_COUNT/zhSELECT sum(population)FROM worldselect distinct continent from worldSELECT sum(gdp)FROM worldwhere continent='Africa'select count(name) from world where area>=1000000SELECT sum(population)FROM world where n..
2020-09-14 08:20:19
153
原创 SQLZ00答案3:SELECT_within_SELECT_Tutorial/zh
SELECT name FROM world WHERE population >(select population from world where name='Russia')select name from worldwhere continent='Europe' and gdp/population>(select gdp/population from world where name='United Kingdom') select nam...
2020-09-14 07:59:29
343
原创 SQLZ00答案2:SELECT_from_Nobel_Tutorial/zh答案
sqlzoo.net/SELECT_from_Nobel_Tutorial/zhselect yr,subject,winner from nobel where yr=1950select winner from nobel where yr=1962 and subject='Literature'select yr,subject from nobel where winner='Albert Einstein'select winner from n..
2020-09-13 00:08:18
168
原创 SQLZOO答案1:SELECT_from_WORLD_Tutorial/zh答案
SQLZOO:SELECT_from_WORLD_Tutorial/zhSELECT name, continent, population FROM worldSELECT name FROM worldWHERE population>200000000SELECT name,gdp/population FROM worldWHERE population>200000000SELECT name,population/1000000 FRO..
2020-09-12 22:19:11
243
原创 在mac上双击pycharm无反应,重装解决不了问题。
问题:在mac上双击pycharm无反应,重装解决不了问题。1.cd /Users/用户名/Library/Preferences/PyCharm2019.3/2.rm -f pycharm.vmoptionswelldone
2020-02-26 19:53:11
2532
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人