一.编写代码 1.思路分析 要求一个数组中最大子数组之和,可对数组中的子数组进行遍历,再对子数组中的值进行遍历,然后累加,存储到临时变量中,比较每一个子数组中的值之和,最后得出最大数组之和。 2.java代码 package homework; public class MaxSubArray { ...
分类:
编程语言 时间:
2021-03-16 13:30:05
阅读次数:
0
冒泡排序 1.动图演示 2.代码实现 private static void bubbleSort(int[] arr) { if (arr.length <= 1) return; for (int i = 0; i < arr.length; i++) { // 用于标识数组是否有序 boole ...
分类:
编程语言 时间:
2021-03-16 13:24:13
阅读次数:
0
.uboot下如何查看内存里的数据 使用md工具 md.b $address $count (从地址$address处显示$count个字节的数据,b=byte,8位) md.w $address $count (从地址$address处显示$count个字的数据,w=word,16位) md.l ...
分类:
其他好文 时间:
2021-03-16 11:48:00
阅读次数:
0
最长公共前缀 Category Difficulty Likes Dislikes algorithms Easy (39.25%) 1495 - 编写一个函数来查找字符串数组中的最长公共前缀。 如果不存在公共前缀,返回空字符串 ""。 示例 1: 输入:strs = ["flower","flow ...
分类:
其他好文 时间:
2021-03-15 11:21:15
阅读次数:
0
1.字符串中的Str.charAt(num)方法能将字符串中的字符分割。 2.字符串中的长度方法String.length(); 3.把字符串转换为数组 String.toCharArray() 4.字符串翻转方法:reverse()。 5.字符串判断相等的方法: String1.equals(St ...
分类:
编程语言 时间:
2021-03-15 11:10:39
阅读次数:
0
数组的使用 For-Each 循环 普通的for循环 数组作方法入参 数组做返回值 package com.liuqi.array; public class ArrayDemo04 { public static void main(String[] args) { int[] arrays = ...
分类:
编程语言 时间:
2021-03-15 11:04:39
阅读次数:
0
Check If a String Contains All Binary Codes of Size K (M) 题目 Given a binary string s and an integer k. Return True if every binary code of length k is ...
分类:
其他好文 时间:
2021-03-15 10:41:54
阅读次数:
0
访问官网:http://www.ee.ic.ac.uk/hp/staff/dmb/perl/index.html 写在前面 首先需要确定电脑上已经装好texlive, 包含了 bibtex.exe,如: 然后,装好了word, 下载bibtex4word http://www.ee.ic.ac.uk ...
代码实现 checkLength(rule, value, callback) { let split = value.split('#'); if (split && split.length) { split.forEach(item => { if (item && item.length > ...
分类:
其他好文 时间:
2021-03-11 14:17:31
阅读次数:
0
$icon-color: #00fdfb, #ffd200, #fb5911, #2cf698, #5da6fb, #d75efb, #9fff10; @for $i from 1 through length($icon-color) { $item: nth($icon-color, $i); ...
分类:
编程语言 时间:
2021-03-11 11:43:31
阅读次数:
0