成绩排序 |
您所在的位置:网站首页 › word成绩排序为什么平均分也拍进去了 › 成绩排序 |
华为od一面面试算法
KJ.JK: 2023华为OD机试真题(C语言):https://blog.csdn.net/m0_47384542/category_12265421.html?spm=1001.2014.3001.5482 2023华为OD机试真题(Python语言):https://blog.csdn.net/m0_47384542/category_11954021.html 2023华为OD机试真题(JS 语言):https://blog.csdn.net/m0_47384542/category_12357945.html 2023华为OD机试真题(C++语言):https://blog.csdn.net/m0_47384542/category_12363874.html?spm=1001.2014.3001.5482 2023华为OD机试真题(Java 语言):https://blog.csdn.net/m0_47384542/category_12360182.html 华为od一面面试算法Dragon@:): public static int memoryCells(String memory, int cnt) { char[] chars = memory.toCharArray(); int left = 0, right = 0; int max = 0; int usedCount = 0; while (right < chars.length) { if (chars[right] == 'x') { usedCount++; } while (usedCount > cnt) { if (chars[left] == 'x') { usedCount--; } left++; } System.out.println("====="+ (right-left+1)); max = Math.max(max, right - left + 1); right++; } return max; } go chan基本使用
@小码哥:
一起加油 MISAYAONE: 华为OD 2023/2022 最新机试题及讲解,100%通过率。 Java: https://renjie.blog.csdn.net/article/details/127947829 Python: https://renjie.blog.csdn.net/article/details/127946125 C++: https://renjie.blog.csdn.net/article/details/126965954 Js: https://renjie.blog.csdn.net/article/details/128974467 C: https://renjie.blog.csdn.net/article/details/129190260 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |