摘要:
leetcode 第141题:环形列表 第一种:哈希列表 public boolean hasCycle(ListNode head) { Set<ListNode> seen = new HashSet<ListNode>(); while (head != null) { if (seen.co 阅读全文
posted @ 2024-02-05 15:23
米乡卷炸粉
阅读(9)
评论(0)
推荐(0)
摘要:
leetcode 数据库 第176题:第二高的薪水 第一种:去掉最大的薪水,选取第二大的薪水 select max(salary) as SecondHighestSalary from Employee where salary < (select max(salary) from Employe 阅读全文
posted @ 2024-02-04 13:53
米乡卷炸粉
阅读(15)
评论(0)
推荐(0)
摘要:
leetcode 数据库 第175题:组合两个表 因为表 Address 中的 personId 是表 Person 的外关键字,所以我们可以连接这两个表来获取一个人的地址信息。 考虑到可能不是每个人都有地址信息,我们应该使用 outer join 而不是默认的 inner join。 如果没有某个 阅读全文
posted @ 2024-02-04 13:42
米乡卷炸粉
阅读(18)
评论(0)
推荐(0)
浙公网安备 33010602011771号