代码改变世界

leetcode-0083 remove duplicates from sorted list

2022-05-09 21:20 by jetwill, 8 阅读, 0 推荐, 收藏, 编辑
摘要:Given the head of a sorted linked list, delete all duplicates such that each element appears only once. Return the linked list sorted as well. Example 阅读全文

leetcode-0141 linked-list-cycle

2022-05-09 21:17 by jetwill, 18 阅读, 0 推荐, 收藏, 编辑
摘要:Given head, the head of a linked list, determine if the linked list has a cycle in it. There is a cycle in a linked list if there is some node in the 阅读全文

leetcode-0021 merge-two-sorted-lists

2022-05-07 09:02 by jetwill, 28 阅读, 0 推荐, 收藏, 编辑
摘要:You are given the heads of two sorted linked lists list1 and list2. Merge the two lists in a one sorted list. The list should be made by splicing toge 阅读全文

leetcode 448 - find-all-numbers-disappeared-in-an-array

2022-05-06 21:08 by jetwill, 13 阅读, 0 推荐, 收藏, 编辑
摘要:Given an array nums of n integers where nums[i] is in the range [1, n], return an array of all the integers in the range [1, n] that do not appear in 阅读全文

leetcode 283. Move Zeroes

2022-05-06 13:43 by jetwill, 14 阅读, 0 推荐, 收藏, 编辑
摘要:Given an integer array nums, move all 0's to the end of it while maintaining the relative order of the non-zero elements. Note that you must do this i 阅读全文

LeetCode 88 - Merge Sorted Array

2022-05-04 22:42 by jetwill, 9 阅读, 0 推荐, 收藏, 编辑
摘要:LeetCode 88 - Merge Sorted Array https://leetcode.cn/problems/merge-sorted-array/ You are given two integer arrays nums1 and nums2, sorted in non-decr 阅读全文

Java Fibonacci 示例

2022-05-02 10:09 by jetwill, 87 阅读, 0 推荐, 收藏, 编辑
摘要:斐波那契数列: 第一、第二个数之后的每个数字都是前两个数之和 Java 8 流 1.1 在Java 8中,我们可以使用Stream.iterate生成斐波那契数列,如下所示: import java.util.stream.Stream; public class Main { public sta 阅读全文

使用git push时, 自动忽略__pycache__文件

2022-03-20 15:59 by jetwill, 541 阅读, 0 推荐, 收藏, 编辑
摘要:需求 git push时,忽略自定义文件(如:pycache 有数据库密码的配置文件 等等) 方案,编辑 .gitignore # Django **/__pycache__/ 阅读全文

Django 重新生成表结构

2022-03-20 15:56 by jetwill, 184 阅读, 0 推荐, 收藏, 编辑
摘要:将app内migrations文件夹里除了__init__.py这个文件外的所有文件删除。 登录数据库,找到django_migrations这个表,然后将表内对应的应用app下的migrations记录删除即可。 或者直接删除库 重新执行命令 python manage.py makemigrat 阅读全文

mysql 常用命令

2022-03-20 10:57 by jetwill, 27 阅读, 0 推荐, 收藏, 编辑
摘要:将mysql目录下bin目录中的mysql.exe放到C:\WINDOWS下,可以执行以下命令 连接:mysql -h主机地址 -u用户名 -p用户密码 (注:u与root可以不用加空格,其它也一样) 或 mysql -h主机地址 -u用户名 -p 断开:exit (回车) 创建授权:grant s 阅读全文
上一页 1 2 3 4 5 6 7 8 ··· 20 下一页