自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

同销万古愁的博客

边学习边记录

  • 博客(106)
  • 收藏
  • 关注

原创 185. Department Top Three Salaries

Table:Employee+--------------+---------+| Column Name | Type |+--------------+---------+| id | int || name | varchar || salary | int || departmentId | int |+--------------+---------+id is the primary key .

2022-01-21 10:39:40 212

原创 24. Swap Nodes in Pairs

Given alinked list, swap every two adjacent nodes and return its head. You must solve the problem withoutmodifying the values in the list's nodes (i.e., only nodes themselves may be changed.)Example 1:Input: head = [1,2,3,4]Output: [2,1,4,3]..

2021-08-24 13:20:22 116

原创 22. Generate Parentheses*

题目:Givennpairs of parentheses, write a function togenerate all combinations of well-formed parentheses.Example 1:Input: n = 3Output: ["((()))","(()())","(())()","()(())","()()()"]Example 2:Input: n = 1Output: ["()"]Constraints:1 ...

2021-08-24 11:24:33 138

原创 17. Letter Combinations of a Phone Number

题目:Given a string containing digits from2-9inclusive, return all possible letter combinations that the number could represent. Return the answer inany order.A mapping of digit to letters (just like on the telephone buttons) is given below. Note that...

2021-06-09 14:46:56 69

原创 15. 3Sum & 16. 3Sum Closest

这两个题非常相似,所以放在一起了题目Given an integer array nums, return all the triplets[nums[i], nums[j], nums[k]]such thati != j,i != k, andj != k, andnums[i] + nums[j] + nums[k] == 0.Notice that the solution set must not contain duplicate triplets.Exampl...

2021-06-09 11:55:45 55

原创 12. Integer to Roman

题目:Roman numerals are represented by seven different symbols:I,V,X,L,C,DandM.Symbol ValueI 1V 5X 10L 50C 100D 500M 1000For example,2is written...

2021-06-06 15:55:20 59

原创 11. Container With Most Water

题目:Givennnon-negative integersa1, a2, ..., an, where each represents a point at coordinate(i, ai).nvertical lines are drawn such that the two endpoints of the lineiis at(i, ai)and(i, 0). Find two lines, which, together with the x-axis forms a...

2021-06-06 11:44:38 109

原创 新华三H3C急招高级网络工程师

岗位职责:负责H3C上海地区行业客户的网络/SDN/云计算项目交付和客户服务支持工作,主要工作内容为:1、项目交付及管理:负责H3C原厂网络、SDN、云计算项目,包括项目方案规划、实施以及后期的运维服务;2、技术培训及支持:为客户及合作伙伴提供网上问题远程、现场支持及专业技术培训;3、售前测试:根据客户需求进行H3C产品和解决方案售前测试;4、价值客户维护:接口并维护价值客户,协调资源,确保H3C客户服务满意度。岗位要求:1、全日制统招公办本科或以上学历,5年以上技术工作经验,年龄35岁以下.

2021-06-04 18:08:28 661 3

原创 42. Trapping Rain Water

题目解法class Solution {public: int trap(int A[], int n) { int left=0; int right=n-1; int res=0; int maxleft=0, maxright=0; while(left<=right){ if(A[left]<=A[right]){ if(A[left]>.

2021-06-01 09:48:32 69

原创 5. Longest Palindromic Substring

题目Example 1:Input: s = "babad"Output: "bab"Note: "aba" is also a valid answer.Example 2:Input: s = "cbbd"Output: "bb"Example 3:Input: s = "a"Output: "a"Example 4:Input: s = "ac"Output: "a"Constraints:1 <= s.length &lt.

2021-05-31 15:27:24 64

原创 258. Add Digits

题目Given an integernum, repeatedly add all its digits until the result has only one digit, and return it.Example 1:Input: num = 38Output: 2Explanation: The process is38 --> 3 + 8 --> 1111 --> 1 + 1 --> 2 Since 2 has only one digi..

2021-05-27 19:46:43 42

原创 43. Multiply Strings

题目:Given two non-negative integersnum1andnum2represented as strings, return the product ofnum1andnum2, also represented as a string.Note:You must not use any built-in BigInteger library or convert the inputs to integer directly.Example 1:...

2021-05-25 10:57:24 113

原创 8. String to Integer (atoi)

目录题目知识点解法一:解法二:题目Implement themyAtoi(string s)function, which converts a string to a 32-bit signed integer (similar to C/C++'satoifunction).The algorithm formyAtoi(string s)is as follows:Read in and ignore any leading whitespace. ...

2021-05-21 13:55:52 103

原创 6. ZigZag Conversion

题目:The string"PAYPALISHIRING"is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H NA P L S I I GY I RAnd then read line by line:"PAHNAPL...

2021-04-28 15:47:34 77

原创 452. Minimum Number of Arrows to Burst Balloons

452.Minimum Number of Arrows to Burst Balloons题目:There are some spherical balloons spread in two-dimensional space. For each balloon, provided input is the start and end coordinates of the horizontal diameter. Since it's horizontal, y-coordinates don'.

2021-04-28 09:22:39 58

原创 435. Non-overlapping Intervals

题目Given an array of intervalsintervalswhereintervals[i] = [starti, endi], returnthe minimum number of intervals you need to remove to make the rest of the intervals non-overlapping.Example 1:Input: intervals = [[1,2],[2,3],[3,4],[1,3]]Output...

2021-04-27 16:50:02 90

原创 56. Merge Intervals

题目Given an arrayofintervalswhereintervals[i] = [starti, endi], merge all overlapping intervals, and returnan array of the non-overlapping intervals that cover all the intervals in the input.Example 1:Input: intervals = [[1,3],[2,6],[8,10],[1...

2021-04-26 22:07:01 113

原创 876Middle of the Linked List

目录题目知识点解法题目Given a non-empty, singlylinked list with head nodehead, returnamiddle node of linked list.If there are two middle nodes, return the second middle node.Example 1:Input: [1,2,3,4,5]Output: Node 3 from this list (Serial...

2021-04-24 10:45:37 59

原创 19Remove Nth Node From End of List

题目Given theheadof a linked list, remove thenthnode from the end of the list and return its head.Follow up:Could you do this in one pass?Example 1:Input: head = [1,2,3,4,5], n = 2Output: [1,2,3,5]Example 2:Input: head = [1], n = 1Out...

2021-04-24 09:07:18 54

原创 387. First Unique Character in a String

题目Given a strings, returnthe first non-repeating character in it and return its index. If it does not exist, return-1.Example 1:Input: s = "leetcode"Output: 0Example 2:Input: s = "loveleetcode"Output: 2Example 3:Input: s = "aabb"Ou...

2021-04-23 16:22:22 99 1

原创 190. Reverse Bits

题目Reverse bits of a given 32 bits unsigned integer.Note:Note that in some languages such as Java, there is no unsigned integer type. In this case, both input and output will be given as a signed integer type. They should not affect your implementatio

2021-04-21 10:15:13 40

原创 SQL 177. Nth Highest Salary

这个和之前找第2高的薪水,解决办法很像。需要注意的是需要提前计算N-1,因为limit里不能识别包含算数运算的表达式而且在函数里,不用加@表示变量。。。CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INTBEGINdeclare nth int;set nth = N-1; RETURN ( # Write your MySQL query statement below. select distinct

2020-11-13 14:19:17 105

原创 SQL 176. Second Highest Salary

目录总结题目解法一解法二rank解法(wrong)总结找第二高的薪水,没有第二高的薪水时,返回null。我用了rank()函数,但是当没有第二高的薪水时,返回的是空,不符合要求。看了下解决方案,个人感觉最好的是用limit或limit+offset来做limit n,m,意为跳过开头的n位,从第n+1位开始取,一共取m个。limit n offset m,意为跳过开头的m位,从第m+1开始取,一共取n个。题目Write a SQL query to ge.

2020-11-09 10:51:34 134

原创 机器学习评价指标

目录基础-TP FN FP TN组合-TPR FPR TNR accuracy precision recall F-1 F-measureBOSS-ROC曲线与AUC面积BOSS-KS综合了网上看的一些知识,加深下理解,有不对请指出基础-TP FN FP TNTP,FN,FP,TN,含义如下表,True/False代表该预测是对的还是错的,Positive/Negat...

2020-04-21 10:14:44 471

原创 深度学习岗位城市分布

在BOSS直聘上搜深度学习,爬取了300个岗位所在地选择排名前10的城市,如下图这300个岗位在地图上的分布:业余的爬虫游戏告一段落。。。。

2020-03-02 21:46:57 262

翻译 TensorBoard教程(一)翻译自官网

目录简介上手通过Keras Model.fit()使用TensorBoard通过其它方法使用TensorBoard简介TensorBoard:TensorFlow的可视化组件TensorBoard提供了机器学习实验中的可视化和工具跟踪和可视化损失、精确度等矩阵 可视化模型图 展示权重、偏置或其它张量随时间变化的直方图 将embedding映射到低维空间...

2020-01-20 08:48:24 468

原创 1154. Day of the Year

下午有点感冒,挑了个简单的题刷来打发时间,然后被大神教做人题目:Given a stringdaterepresenting aGregoriancalendardate formatted asYYYY-MM-DD, return the day number of the year.Example 1:Input: date = "2019-01-09"O...

2019-12-06 10:25:30 287

原创 283. Move Zeroes

目录题目描述高票解法我的解法分析比较题目描述Given an arraynums, write a function to move all0's to the end of it while maintaining the relative order of the non-zero elements.Example:Input: [0,1,0,3,1...

2019-12-03 09:57:00 91

原创 563. Binary Tree Tilt

Given a binary tree, return the tilt of the whole tree.The tilt of a tree node is defined as the absolute difference between the sum of all left subtree node values and the sum of all right subtree ...

2019-02-12 13:39:01 110

原创 get_mnist.sh学习

目录第一行脚本解释器第二行注释第三行符号用法第八行if用法这是caffe里面,下载mnist数据集用到的脚本,在此记录下,也当学习一下shell,如下是脚本内容,为后续方便,添加了行号。 #!/usr/bin/env sh# This scripts downloads the mnist data and unzips it.DIR="$( cd "$(dirn...

2019-02-11 13:48:07 405

原创 977. Squares of a Sorted Array

Given an array of integers A sorted in non-decreasing order, return an array of the squares of each number, also in sorted non-decreasing order.Example 1:Input: [-4,-1,0,3,10]Output: [0,1,9,16,1...

2019-02-04 12:32:36 313

原创 458. Poor Pigs

There are 1000 buckets, one and only one of them contains poison, the rest are filled with water. They all look the same. If a pig drinks that poison it will die within 15 minutes. What is the minimum...

2019-02-02 13:49:43 249

原创 326. Power of Three

目录我的解法高票O(1)解法Given an integer, write a function to determine if it is a power of three.Example 1:Input: 27Output: trueExample 2:Input: 0Output: falseExample 3:Input: 9Output:...

2019-01-31 15:26:14 159

原创 344. Reverse String

目录我的解法高票C++解法高票java 解法Write a function that reverses a string. The input string is given as an array of characters char[].Do not allocate extra space for another array, you must do this by m...

2019-01-31 14:53:55 225

原创 349. Intersection of Two Arrays(c++)

给两个数组,写一个函数来计算这两个数组的交集。Example 1:Input: nums1 = [1,2,2,1], nums2 = [2,2]Output: [2]Example 2:Input: nums1 = [4,9,5], nums2 = [9,4,9,8,4]Output: [9,4]注意:结果中的元素没有重复 结果的顺序无所谓class Solu...

2019-01-29 09:22:35 163

原创 155. Min Stack

题目:Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack. pop() -- Removes the element on top of the stack. top() ...

2019-01-24 13:49:33 113

原创 500. Keyboard Row(c++)及c++ set应用

目录方法一解法知识点方法二解法方法三解法知识点Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below. Example:...

2019-01-24 09:35:43 198

原创 eclipse 安装java ee插件(java se升级到java ee)

本来安装的java se,后需要开发java ee程序,走了些弯路才安装成功。如下是步骤1.打开eclipse,help-&gt;About Eclipse IDE,看好我下图红线圈出的地方,也就是版本号2.help-&gt;install New Software,在Work with的框里填 http://download.eclipse.org/releases/+步骤一中的版本...

2018-09-28 16:25:09 16297 18

原创 205. Isomorphic Strings

 Given two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All occurrences of a character must be replaced with anoth...

2018-07-26 14:03:11 90

原创 Error: Config file not found: /usr/lib/jvm/java-9-openjdk-amd64/conf/management/management.propertie

Linux系统安装hadoop,hadoop namenode -format时出现上述错误,参考了http://www.bubuko.com/infodetail-2482245.html的说法,可以创建软链接,但是我的解决方法是自己又下载安装了jdk,好像只有 openJDK才报这个错,所以我自己去下载了一个安装,解决了问题~...

2018-07-22 18:45:01 1382

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除