02 2021 档案
摘要:Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. You may return the answer in any order. Example 1: Input: n
阅读全文
摘要:描述给一个字符串,你可以选择在一个字符或两个相邻字符之后拆分字符串,使字符串由仅一个字符或两个字符组成,输出所有可能的结果 样例样例1 输入: "123"输出: [["1","2","3"],["12","3"],["1","23"]]样例2 输入: "12345"输出: [["1","23","4
阅读全文
摘要:Given an unsorted integer array nums, find the smallest missing positive integer. Example 1: Input: nums = [1,2,0] Output: 3 Example 2: Input: nums =
阅读全文
摘要:【算法】 题目:input string= "appleeeep"input character= "p"输出每个字母到达最近的p的距离,比如上面对应的输出为:output= {1,0,0,1,2} 面试的过程: 因为实在是太简单了……我先是用文字说了思路、复杂度,问他就这样还是需要优化。我觉得这很
阅读全文
摘要:白人小哥。形式是视频加coderpad。 【编码】20. Valid Parentheses 和原题不一样的地方:case:{{},所以loop字符串最后要加个判断条件! //loop for (char c: s.toCharArray()) { //start judging if (c ==
阅读全文
摘要:【key】PRIMARY KEY主键:只能有一个UNIQUE唯一约束: 确保每一行的数据是唯一的。比如email unique就不能加两条数据都是一样的emailCHECK:添加条件 【数据过滤】DISTINCT:只查不重复的数据。//SELECT DISTINCT state FROM locat
阅读全文
摘要:白人小哥经理。形式是视频加coderpad。 【一】数据库设计和查询。 面试经过:一开始错了,后来在提示之下改对了。 教训:冷静下来,才能正常思考。员工可以记录带薪休假请求并提交批准。 然后,经理可以接受或拒绝该请求。像这样描述:“实体名称:字段1(类型),字段2(类型)”(1)设计erd(2)员工
阅读全文
摘要:Output the most inner string: "ab(cd(e)fg)" => "e", "Hello World!" =>"Hello World!" "ab{cd[ef]} gh(hello{hi})" =>"ef", "hi" 先用https://www.geeksforgeek
阅读全文