代码改变世界

[LeetCode] 203. Remove Linked List Elements_Easy tag: Linked LIst

2018-08-15 00:38 by Johnson_强生仔仔, 153 阅读, 0 推荐, 收藏, 编辑
摘要:Remove all elements from a linked list of integers that have value val. Example: Input: 1->2->6->3->4->5->6, val = 6 Output: 1->2->3->4->5 Remove all 阅读全文

[LeetCode] 680. Valid Palindrome II_Easy tag: Two Pointers

2018-08-15 00:24 by Johnson_强生仔仔, 213 阅读, 0 推荐, 收藏, 编辑
摘要:Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. Example 1: Example 2: Note: 题目思路就是正常的用tw 阅读全文

[LeetCode] 69. Sqrt(x)_Easy tag: Binary Search

2018-08-14 23:53 by Johnson_强生仔仔, 167 阅读, 0 推荐, 收藏, 编辑
摘要:Implement int sqrt(int x). Compute and return the square root of x, where x is guaranteed to be a non-negative integer. Since the return type is an in 阅读全文

[LeetCode] 627. Swap Salary_Easy tag: SQL

2018-08-14 23:33 by Johnson_强生仔仔, 208 阅读, 0 推荐, 收藏, 编辑
摘要:Given a table salary, such as the one below, that has m=male and f=female values. Swap all f and m values (i.e., change all f values to m and vice ver 阅读全文

[LeetCode] 697. Degree of an Array_Easy tag: Hash Table

2018-08-13 05:46 by Johnson_强生仔仔, 138 阅读, 0 推荐, 收藏, 编辑
摘要:Given a non-empty array of non-negative integers nums, the degree of this array is defined as the maximum frequency of any one of its elements. Your t 阅读全文

[LeetCode] 443. String Compression_Easy tag:String

2018-08-13 05:22 by Johnson_强生仔仔, 147 阅读, 0 推荐, 收藏, 编辑
摘要:Given an array of characters, compress it in-place. The length after compression must always be smaller than or equal to the original array. Every ele 阅读全文

[LeetCode] 415. Add Strings_Easy tag: String

2018-08-13 04:21 by Johnson_强生仔仔, 256 阅读, 0 推荐, 收藏, 编辑
摘要:Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: 这个题目跟[LeetCode] 67. Add Binary_Easy tag: S 阅读全文

[LeetCode] 67. Add Binary_Easy tag: String

2018-08-13 04:05 by Johnson_强生仔仔, 197 阅读, 0 推荐, 收藏, 编辑
摘要:Given two binary strings, return their sum (also a binary string). The input strings are both non-empty and contains only characters 1 or 0. Example 1 阅读全文

[LeetCode] 557. Reverse Words in a String III_Easy tag: String

2018-08-13 03:39 by Johnson_强生仔仔, 213 阅读, 0 推荐, 收藏, 编辑
摘要:Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order. E 阅读全文

[LeetCode] 176. Second Highest Salary_Easy tag: SQL

2018-08-12 05:28 by Johnson_强生仔仔, 179 阅读, 0 推荐, 收藏, 编辑
摘要:Write a SQL query to get the second highest salary from the Employee table. + + + | Id | Salary | + + + | 1 | 100 | | 2 | 200 | | 3 | 300 | + + + For 阅读全文
上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 39 下一页