ICode9

精准搜索请尝试: 精确搜索
  • Day9 while语句2022-04-24 19:04:27

    今天的不难 1 public class WhileStatement { 2 3 /** 4 * The entrance of the program 5 * @param args 6 */ 7 public static void main(String args[]) { 8 whileStatementTest(); 9 }// Of main 10 11 /** 12 *

  • 第一周,博客2021-12-24 23:30:16

            这篇博客写得很仓促,对某些部分可能掌握不是很好请见谅。第二题代码经过转载,已进行说明。 本人使用eclipse编写java(也要用记事本写,就是效率有点低),环境早已经配置完毕,就不做截图演示了。 2021.12.22 以下是一些java基础编程题  编写HelloWorld.java. 一定要注意变

  • Leetcode 11. 盛最多水的容器2021-09-12 20:04:06

    题目 给你 n 个非负整数 a1,a2,…,an,每个数代表坐标中的一个点 (i, ai) 。在坐标内画 n 条垂直线,垂直线 i 的两个端点分别为 (i, ai) 和 (i, 0) 。找出其中的两条线,使得它们与 x 轴共同构成的容器可以容纳最多的水。 说明:你不能倾斜容器。 示例 1: 输入:[1,8,6,2,5,4,8,3,7]

  • 【Leetcode】152. 乘积最大子数组2021-04-24 10:04:36

    题目描述 // 152. 乘积最大子数组 // 给你一个整数数组 nums ,请你找出数组中乘积最大的连续子数组(该子数组中至少 // 包含一个数字),并返回该子数组所对应的乘积。 题解 // 动态规划 // 本题目如果参考最大子串和的话,初始化中途遍历子串的最大乘积tempMax=1, // for循环遍

  • 1026. Maximum Difference Between Node and Ancestor2020-04-05 10:54:10

    Given the root of a binary tree, find the maximum value V for which there exists different nodes A and B where V = |A.val - B.val| and A is an ancestor of B. (A node A is an ancestor of B if either: any child of A is equal to B, or any child of

  • 算法(动态规划一)n个学生问题2020-03-08 17:01:21

    1、题目描述(网易)    有 n 个学生站成一排,每个学生有一个能力值,牛牛想从这 n 个学生中按照顺序选取 k 名学生,要求相邻两个学生的位置编号的差不超过 d,使得这 k 个学生的能力值的乘积最大,你能返回最大的乘积吗? 输入描述:    每个输入包含 1 个测试用例。每个测试数据的第一行包

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有