摘要: 给定一个字符串(以字符数组的形式给出)和一个偏移量,根据偏移量原地旋转字符串(从左向右旋转)。 样例 : 输入: str="abcdefg", offset = 3 输出: str = "efgabcd" 样例解释: 注意是原地旋转,即str旋转后为"efgabcd" public class De 阅读全文
posted @ 2020-11-26 14:54 YMNZZ 阅读(266) 评论(0) 推荐(0)
摘要: class Solution01 { public static int kthLargestElement(int n, int[] nums) { /*ArrayList<Integer> list =new ArrayList<>(); for (int i = 0; i <nums.leng 阅读全文
posted @ 2020-11-26 14:43 YMNZZ 阅读(66) 评论(0) 推荐(0)