LeetCode刷题
_dingzhen
一枚可爱又迷人的后端coder!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Longest Substring Without Repeating Characters滑动窗口算法
Leetcode: Longest Substring Without Repeating Characters Given a string s, find the length of the longest substring without repeating characters. Example 1: Input: s = "abcabcbb" Output: 3 Explanation: The answer is "abc", with the length of 3. Example 2:原创 2020-11-04 00:41:31 · 397 阅读 · 0 评论 -
Maximum Subarray
Maximum Subarray description: Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Example: Input: [-2,1,-3,4,-1,2,1...原创 2020-04-07 22:43:52 · 369 阅读 · 0 评论 -
30-Day LeetCoding Challenge!
Welcome to the 30-Day LeetCoding Challenge! 由于不平凡的2020疫情影响,全世界大部分人都呆在家里防止感染病毒,于是leecode发起了一个30天代码挑战,从4.1~4.30,下面我将开始挑战! Problem1: Single Number Given a non-empty array of integers, every element appea...原创 2020-04-01 23:21:17 · 513 阅读 · 0 评论 -
Reverse Linked List
Reverse Linked List Reverse a singly linked list. Example: Input: 1->2->3->4->5->NULL Output: 5->4->3->2->1->NULL Follow up: A linked list can be reversed either iterat...原创 2020-03-31 18:05:05 · 364 阅读 · 0 评论 -
Exchange Seats
Exchange Seats description: Mary is a teacher in a middle school and she has a table seat storing students’ names and their corresponding seat ids. The column id is continuous increment. Mary wants to...原创 2020-03-28 22:24:23 · 391 阅读 · 0 评论 -
Rising Temperature
Rising Temperature description: Given a Weather table, write a SQL query to find all dates’ Ids with higher temperature compared to its previous (yesterday’s) dates. +---------+------------------+---...原创 2020-03-27 16:44:48 · 311 阅读 · 0 评论 -
Delete Duplicate Emails
Delete Duplicate Emails description: Write a SQL query to delete all duplicate email entries in a table named Person, keeping only unique emails based on its smallest Id. +----+------------------+ | I...原创 2020-03-27 10:14:49 · 284 阅读 · 0 评论 -
Department Top Three Salaries
Department Top Three Salaries description: The Employee table holds all employees. Every employee has an Id, and there is also a column for the department Id. +----+-------+--------+--------------+ |...原创 2020-03-25 23:11:17 · 232 阅读 · 0 评论 -
Integer to Roman
Integer to Roman description: Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L 50 C...原创 2020-03-17 20:46:30 · 235 阅读 · 0 评论 -
Second Highest Salary and Nth Highest Salary
Second Highest Salary Write a SQL query to get the second highest salary from the Employee table. +----+--------+ | Id | Salary | +----+--------+ | 1 | 100 | | 2 | 200 | | 3 | 300 | +----+...原创 2020-03-16 11:21:45 · 165 阅读 · 0 评论 -
Combine Two Tables
[Combine Two Tables] Table: Person +-------------+---------+ | Column Name | Type | +-------------+---------+ | PersonId | int | | FirstName | varchar | | LastName | varchar | +--------...原创 2020-03-16 10:23:41 · 218 阅读 · 0 评论 -
String to Integer(atoi)
String to Integer(atoi) description: Implement atoi which converts a string to an integer. The function first discards as many whitespace characters as necessary until the first non-whitespace charac...原创 2020-03-15 21:38:39 · 250 阅读 · 0 评论 -
LeetCode刷题~
老姐让我刷LeetCode的题,就当复习数据结构了,算法和代码能力真的只有通过刷题才提升得快啊 通过第一次的题也大概知道了leetcode的写题方式,不用头文件,库文件各种东西它只给你一个函数/方法, 把这个题的解决方法写入这个函数/方法即可,而且支持vim模式下的编辑,真的很方便 * Two Sum Given an array of integers, return indices of...原创 2019-05-22 12:18:57 · 1145 阅读 · 0 评论
分享