Hi, this is Shunchi!

  • Home

  • Tags0

  • Archives267

  • Categories0

  • Curricula

  • DSA

  • LeetCode_Notes

  • Interviews

  • General

  • Resume

180. Consecutive Numbers

Posted on 2020-05-23 | Edited on 2021-01-22

https://leetcode.com/problems/consecutive-numbers/

Explanation

1
2
3
4
# Write your MySQL query statement below
SELECT DISTINCT Num AS ConsecutiveNums
FROM Logs
WHERE (Id+1,Num) IN (SELECT * FROM Logs) AND (Id+2,Num) IN (SELECT * FROM Logs);
<1…195196197…267>
ShunchiZhou

ShunchiZhou

267 posts
RSS
GitHub E-Mail Gitbook Linkedin
© 2024 ShunchiZhou
Powered by Hexo v5.4.0
|
0%