给定两个整数,分别表示分数的分子 numerator 和分母 denominator,以 字符串形式返回小数 。 如果小数部分为循环小数,则将循环的部分括在括号内。 如果存在多个答案,只需返回 任意一个 。 对于所有给定的输入,保证 答案字符串的长度小于 104 。 leetcode 解题思路:这里 ...
分类:
编程语言 时间:
2021-01-05 10:58:24
阅读次数:
0
1. forEach and Map普通方式遍历 Map Map<String, Integer> items = new HashMap<>(); items.put("A", 10); items.put("B", 20); items.put("C", 30); items.put("D", ...
分类:
编程语言 时间:
2021-01-05 10:40:24
阅读次数:
0
0.创建用户并付权限 sudo useradd iwbdsudo passwd iwbd 配置iwbd用户具有root权限 修改/etc/sudoers文件,找到下面一行(91行),在root下面添加一行,如下所示:## Allow root to run any commands anywhere ...
分类:
其他好文 时间:
2021-01-04 11:30:50
阅读次数:
0
排序大家都经常用的吧,下面是个学生类,2 个字段:id[学号],score[分数], public class Stu { //编号 private Integer id; //分数 private Integer score; public Stu(Integer id, Integer scor ...
分类:
编程语言 时间:
2021-01-01 13:00:11
阅读次数:
0
思路:回溯搜索 + 剪枝。 注意,回溯做选择的方法,不适用于有 “有重复元素的数组”。因此,重点掌握 常规回溯算法的写法。 class Solution { public List<List<Integer>> combinationSum2(int[] candidates, int target ...
分类:
其他好文 时间:
2021-01-01 12:54:26
阅读次数:
0
//等比例缩小 uses Math; var Zoom:Extended; W,H:integer; bmp:Tbitmap; begin bmp:=Tbitmap.Create; bmp.LoadFromFile('c:\aa.bmp'); Zoom:=Image1.Width/Max(bmp.W ...
【举一反三】: 剑指27.字符串的排列 ☆☆回溯算法入门级经典题目,理论讲解及分类习题:回溯算法入门级详解 + 练习(持续更新) 思路1:标记数组 思路2:交换位置。相比思路1,空间复杂度低。 class Solution { public List<List<Integer>> permute(i ...
分类:
其他好文 时间:
2020-12-31 12:49:19
阅读次数:
0
##A City ##B Black and White ??? ##C Dirichlet \(k\)-th root !!! ##D Fire ??? ##E Flow !!! ##F Game ??? ##G Happiness ??? ##H King !!! ##I Moon ??? ## ...
分类:
其他好文 时间:
2020-12-31 11:47:17
阅读次数:
0
Given an array of non-negative integers nums, you are initially positioned at the first index of the array. Each element in the array represents your ...
分类:
其他好文 时间:
2020-12-29 11:18:24
阅读次数:
0
我认为学python应该先系统地熟悉下语言的基础,大致掌握python语言的特性,切片、map、lambda表达式、面向对象等,如果做爬虫或web服务的话三个器(生成器、迭代器、装饰器)、三个程(多进行、多线程、协程)都了解下,后面看你想拿他做什么?
分类:
编程语言 时间:
2020-12-25 13:18:39
阅读次数:
0