老师可以提供Leetcode 215 利用快排思想的java代码参考吗?

来源:3-5 三路快排partition思路的应用 Sort Color

weixin_慕妹5444478

2019-11-08

写回答

1回答

liuyubobobo

2019-11-09

C++ 可以 AC 的代码如下:https://github.com/liuyubobobo/Play-Leetcode/blob/master/0215-Kth-Largest-Element-in-an-Array/cpp-0215/main3.cpp


看看自己能不能看懂逻辑,翻译成 Java 代码? 


在我的《算法和数据结构》课程中,提供了这个算法的 Java 补充代码(不是针对这个题设计的),看看是否可以参考:https://github.com/liuyubobobo/Play-with-Algorithms/blob/master/03-Sorting-Advance/Course%20Code%20(Java)/Optional-05-Selection/src/bobo/algo/Selection.java


继续加油!:)

0
0

玩转算法面试-- Leetcode真题分门别类讲解

课程配套大量BAT面试真题,高频算法题解析,强化训练

7446 学习 · 1159 问题

查看课程