- 博客(10)
- 收藏
- 关注
原创 378. Kth Smallest Element in a Sorted Matrix
原题链接 Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix. Note that it is the kth smallest element in the sorted...
2018-04-17 15:15:47 105
原创 1. Two Sum
原题链接 Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not ...
2018-04-17 13:42:17 93
原创 561. Array Partition I
原题链接 Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), …, (an, bn) which makes sum of min(ai, bi) for all i from 1 to n as large ...
2018-04-17 10:22:26 103
原创 441. Arranging Coins
原题链接 You have a total of n coins that you want to form in a staircase shape, where every k-th row must have exactly k coins. Given n, find the total number of full staircase rows that can be ...
2018-04-14 12:15:36 116
原创 415. Add Strings
原题链接 Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: The length of both num1 and num2 is < 5100. Both num1 and num2 contains...
2018-04-14 11:41:16 77
原创 258. Add Digits
原题连接 Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has...
2018-04-14 11:34:14 95
原创 67. Add Binary
原题连接 Given two binary strings, return their sum (also a binary string). For example, a = “11” b = “1” Return “100”.思路:模仿整数加法。AC代码:class Solution {public: string addBinary(...
2018-04-14 11:21:17 75
原创 717. 1-bit and 2-bit Characters
原题连接 We have two special characters. The first character can be represented by one bit 0. The second character can be represented by two bits (10 or 11). Now given a string represented by sev...
2018-04-13 17:23:01 108
原创 QT 加载.so动态链接库
例子:文件路径/usr/local/lib/libtest.so在.pro文件中写LIBS +=-L/usr/local/lib -ltest
2018-04-07 14:52:56 8670 1
原创 牛客网-数据库SQL实战
查找最晚入职员工的所有信息select * from employees order by hire_date desc limit 0,1 查找入职员工时间排名倒数第三的员工所有信息select * from employees order by hire_date desc limit 2,1 查找当前薪水详情以及部门编号dept_noselect salari...
2018-04-07 14:49:24 1129
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人