一、题目

LeetCode596之超过5名的学生(MySQL实现)

二、一种解题思路

1)介绍:分组计数解法(记得去重啊)

   时间复杂度:O(n)

   空间复杂度:O(1)

2)核心代码:

select Class
from courses
group by Class
having count(distinct student)>=5

三、LeetCode成功截图

LeetCode596之超过5名的学生(MySQL实现)

四、感想

感觉自己还没做到最好,希望大家有好方法指教下,加油,加油,再加油,坚持,坚持,再坚持。

相关文章:

  • 2021-12-05
  • 2021-11-01
  • 2022-12-23
  • 2022-12-23
  • 2021-04-13
  • 2021-09-06
  • 2022-12-23
  • 2021-09-23
猜你喜欢
  • 2022-12-23
  • 2021-06-15
  • 2022-12-23
  • 2021-06-23
  • 2021-10-06
  • 2021-10-04
  • 2021-06-25
相关资源
相似解决方案