- 博客(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 78
原创 SQLZOO答案6:More_JOIN_operations/zh
/More_JOIN_operations/zh SELECT id,title FROM movie WHERE yr=1962 select yr FROM movie WHERE title='Citizen Kane' select id,title,yr from movie where title like 'Star Trek%' order by yr select title from movie where id in(11768, 1195..
2020-09-15 09:29:08 146
原创 SQLZOO答案5:The_JOIN_operation/zh
The_JOIN_operation/zh SELECT matchid,player FROM goal WHERE teamid = 'GER' SELECT id,stadium,team1,team2 FROM game where id=1012 select a.player,a.teamid,b.stadium,b.mdate from goal as a left join game as b on a.matchid = b.id where..
2020-09-14 14:30:16 132
原创 SQLZ00答案4:SUM_and_COUNT/zh
SUM_and_COUNT/zh SELECT sum(population) FROM world select distinct continent from world SELECT sum(gdp) FROM world where continent='Africa' select count(name) from world where area>=1000000 SELECT sum(population) FROM world where n..
2020-09-14 08:20:19 136
原创 SQLZ00答案3:SELECT_within_SELECT_Tutorial/zh
SELECT name FROM world WHERE population > (select population from world where name='Russia') select name from world where continent='Europe' and gdp/population> (select gdp/population from world where name='United Kingdom') select nam...
2020-09-14 07:59:29 321
原创 SQLZ00答案2:SELECT_from_Nobel_Tutorial/zh答案
sqlzoo.net/SELECT_from_Nobel_Tutorial/zh select yr,subject,winner from nobel where yr=1950 select 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 163
原创 SQLZOO答案1:SELECT_from_WORLD_Tutorial/zh答案
SQLZOO:SELECT_from_WORLD_Tutorial/zh SELECT name, continent, population FROM world SELECT name FROM world WHERE population>200000000 SELECT name,gdp/population FROM world WHERE population>200000000 SELECT name,population/1000000 FRO..
2020-09-12 22:19:11 238
原创 在mac上双击pycharm无反应,重装解决不了问题。
问题:在mac上双击pycharm无反应,重装解决不了问题。 1.cd /Users/用户名/Library/Preferences/PyCharm2019.3/ 2.rm -f pycharm.vmoptions welldone
2020-02-26 19:53:11 2528
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人