ICode9

精准搜索请尝试: 精确搜索
  • 每日小摘2022-05-24 20:32:58

    1.少年曾许凌云志,势做天下第一流。 2.一年三百六十五天,唯你的生日才是我命中注定的情人节--------------余光中 3.春未尽,夏初临,打上花火! 4.你知道自信和优越感的区别嘛?    自信是我觉得我很好,优越感是我觉得我比你好。不要影响你自对自我价值的判断和认可。 5.我喜欢你,如鲸向海,

  • 每日一题2022-05-21 14:34:52

    2022-05-20:给定一个正数数组arr,长度为N,依次代表N个任务的难度,给定一个正数k, 你只能从0任务开始,依次处理到N-1号任务结束,就是一定要从左往右处理任务, 只不过,难度差距绝对值不超过k的任务,可以在一天之内都完成。 返回完成所有任务的最少天数。 来自微软。 public int minDay(int[]

  • 每日温度2022-05-20 12:00:50

    给定一个整数数组 temperatures ,表示每天的温度,返回一个数组 res ,其中 res[i]是指在第 i 天之后,才会有更高的温度。如果气温在这之后都不会升高,请在该位置用 0 来代替。 暴力解法:两层for循环即可 class Solution { public int[] dailyTemperatures(int[] temperatures) {

  • 每日小摘2022-05-17 23:00:45

      1.村上春树在《挪威的森林》中写道:“我一点也没做好二十岁的准备,挺纳闷的,就像谁从背后推了我一样”   事实上我根本没有做好二十二岁的准备,我依然会被一些小事影响,依然爱说反话,还是那个遇到挫折就像逃避的小孩。   我经常不敢相信自己已经是二十多岁了,身边的人都在往前走,恋爱

  • 每日一句2022-05-10 12:31:06

    Week 4 2022.3.11 Fri 2022.3.12 Sat Week 5 2022.3.14 Mon 2022.3.15 Tue Tomorrow comes never. 切莫依赖明天。 2022.3.16 Wed All things come to those who wait. 苍天不负有心人。 2022.3.17 Thur Forever friend gets your through the hard times, the

  • LeetCode每日一练【25】2022-05-07 09:04:05

    # Reverse Nodes in K Group ## 我的提交 ### 介绍 阿西吧! ### 思路 递归算法 + 闭包 1. 将链表等分为n个分组 2. 翻转单个分组的指向 3. 连接所有分组 ### 代码 ```js /*  * @Author: fox  * @Date: 2022-05-06 10:25:12  * @LastEditors: fox  * @LastEditTime: 2

  • 2022.5.6 AcWing每日一题2022-05-06 09:02:44

    签到题 字符串模拟二进制加法,因为 X17 = X16 + X1,而 16 倍相当于二进制左移四位,再和本身进行二进制相加即可。 #include <bits/stdc++.h> using namespace std; const int N = 1e3 + 10; int a[N]; int b[N]; string str; int main() { cin >> str; int len = str.size(); f

  • LeetCode每日一练【23】2022-05-04 18:31:07

    Merge K Sorted Lists 我的解题 介绍 差强人意的解法, 虽然勉强可以接受, 但是 400ms 左右的运行时间和 70 mb 的内存使用, 还是让人很难接受! 思路 参考: https://www.cnblogs.com/mapodoufu/p/16218278.html 同二链表排序的方法相似, 我们可以将二维数组链表看成多个二链表排序

  • LeetCode每日一练【22】2022-05-04 15:32:09

    Generate Parentheses 我的代码 介绍 不是我写的, 我可写不出来, 看懂都费劲! 思路 递归运算, 内嵌函数 创建两个指针: left(左括号数量), right(右括号数量), curr(临时存储的字符串) 首先判断 left === n && right === n, 如果都等于的话, 证明结果符合条件, 将curr入组, 返回

  • LeetCode每日一练【21】2022-05-03 14:34:43

    Merge Two Sorted Lists 我的解法 我的第一次提交 介绍 ..... 思路 构建链表: listNode(存放返回结果), listnode1(链表1), listnode2(链表2) 创建三个指针分别指向三个链表: let [pointer, pointer1, pointer2] = [listnode, listnode1.next, listnode2.next]; 依次比较lis

  • LeetCode每日一练【20】2022-05-03 11:03:51

    Valid Parentheses 我的解法 我的第一次提交 介绍 介绍, 介绍个锤子, 又不难! 思路 创建栈stack用来存储: (, [, { 遍历原始字符串 如果是(, [, {, 就入栈stack 如果是), 就检查栈顶元素是否为(, 如果是就出栈 如果是], 同2 如果是}, 同2 检查指针i=arr.length ? 和 stack

  • LeetCode每日一练【19】2022-05-03 09:02:02

    Remove Nth From From End Of List 我的解法 第一次提交 介绍 别看我, 看我干啥? 看代码啊! 思路 构建链表: new ListNode(0, arr) 创建两个指针: x_pointer(遍历链表), y_pointer(遍历链表 - 删除节点) 代码 /* * @Author: fox * @Date: 2022-05-03 07:11:41 * @LastEditors

  • LeetCode每日一练【18】2022-05-02 22:34:01

    Four Sum 我的解法 介绍 太好了! 虽然并不是每次, 但是在测试代码的时候, 居然出现了内存使用率超过了100.00%! 虽然并非每次都是, 但是这也证明了代码的可用性. 思路 可以参考三和法和二和法, 不过多赘述: https://www.cnblogs.com/mapodoufu/p/16215421.html 和 https://www.cn

  • LeetCode每日一练【17】2022-05-02 19:03:53

    Letter Combinations of a Phone Number 我的解法 第一次提交 介绍 虽然没有什么期待, 但是貌似结果出乎意料的好, 使用三重循环遍历的方式解决问题 思路 其实没啥好说的, 就一层一层嵌套循环遍历呗 代码 /* * @Author: fox * @Date: 2022-05-02 17:04:48 * @LastEditors: fo

  • LeetCode每日一练【12】2022-04-29 16:31:46

    LeetCode -- Integer to Roman 除数计数法 思路: 将所有罗马数字和数字的映射关系存储到对象中 依次使用罗马数字对应的数字数组romanVals与参数数字进行除法操作(获取罗马数字重复次数digit)和求余操作(判断罗马数字的类型) 根据获得到的罗马数字对应的数字value, 返回罗马数字,

  • leetcode单调栈-每日温度2022-04-25 10:34:45

    import java.util.Stack; /** <p>给定一个整数数组&nbsp;<code>temperatures</code>&nbsp;,表示每天的温度,返回一个数组&nbsp;<code>answer</code>&nbsp;,其中&nbsp;<code>answer[i]</code>&nbsp;是指在第 <code>i</code&g

  • LeetCode每日一练【9】2022-04-25 08:00:06

    LeetCode每日一练 Palindrome Number /* * @Author: fox * @Date: 2022-04-25 07:29:15 * @LastEditors: fox * @LastEditTime: 2022-04-25 07:45:12 * @Description: https://leetcode.com/problems/palindrome-number/ */ /** * @param {number} x * @return {boolean}

  • LeetCode每日一练【8】2022-04-24 09:02:14

    LeetCode每日一练 String to Integer (atoi) /* * @Author: fox * @Date: 2022-04-24 07:10:32 * @LastEditors: fox * @LastEditTime: 2022-04-24 08:39:35 * @Description: https://leetcode.com/problems/string-to-integer-atoi/ */ /** * @description: 大神写的 *

  • LeetCode每日一练【7】2022-04-23 09:03:10

    LeetCode每日一练 Revese Interger /* * @Author: fox * @Date: 2022-04-23 07:09:48 * @LastEditors: fox * @LastEditTime: 2022-04-23 08:33:19 * @Description: https://leetcode.com/problems/reverse-integer/ */ /** * @description: 大神写的 * @param {number}

  • LeetCode每日一练【4】2022-04-21 06:31:34

    LeetCode每日一练 median-of-two-sorted-arrays const findMedianSortedArrays = (nums1, nums2) => { const nums = [...nums1, ...nums2].sort((a, b) => { return a - b; }); const length = nums.length; const median = Math.floor(length / 2

  • LeetCode每日一练【3】2022-04-20 10:03:59

    LeetCode每日一练 Longest Substring Without Repeating Characters function lengthOfLongestSubstring(s) { const scanner = [] let longest = 0 for (const element of s) { // 查找当前元素是否在数组中 const possibleIndex = scanner.indexOf(e

  • LeetCode每日一练2022-04-18 22:01:31

    LeetCode每日一练 two_sum /* * @Author: fox * @Date: 2022-04-18 20:46:49 * @LastEditors: fox * @LastEditTime: 2022-04-18 21:49:00 * @Description: https://leetcode.com/problems/two-sum/ */ const twoSum = (nums, target) => { // 1 创建一个 Map const

  • 每日一学--图片的放入--012022-04-17 09:02:28

                     

  • java实例-每日一练2022-04-06 15:33:21

    字符串的分割 通过split(string) 方法通过指定分隔符将字符串分割为数组: 1 public class JavaStringSplitEmp { 2 public static void main(String args[]){ 3 4 String str = "www-baidu-com"; 5 String[] temp; 6 String delimeter = "-";

  • 每日一句2022-04-02 13:03:10

    2022.3.15 Tue Tomorrow comes never. 切莫依赖明天。 2022.3.16 Wed All things come to those who wait. 苍天不负有心人。 2022.3.17 Thur Forever friend gets your through the hard times, the sad times, and the confused times. 真正的朋友会与你一起度过困难、伤心和烦

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

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

ICode9版权所有