不easy系列之(4)--考新郎 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 25425 Accepted Submission(s): 9311 Problem Description 国庆期间,省城HZ刚刚举行了一场盛大的集体婚礼,为了使婚礼进行的丰富一些,司仪暂时想出了有一个有意思的节目,叫做"考新郎",详细的…
LeetCode--single-number系列 Question 1 Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory? Soluti…
不easy系列之(3)-- LELE的RPG难题 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 30222 Accepted Submission(s): 12144 Problem Description 人称"AC女之杀手"的超级偶像LELE近期忽然玩起了深沉,这可急坏了众多"Cole"(LELE的粉丝,即…
Leetcode算法系列(链表)之删除链表倒数第N个节点 难度:中等给定一个链表,删除链表的倒数第 n 个节点,并且返回链表的头结点.示例:给定一个链表: 1->2->3->4->5, 和 n = 2.当删除了倒数第二个节点后,链表变为 1->2->3->5.说明:给定的 n 保证是有效的.链接:https://leetcode-cn.com/problems/remove-nth-node-from-end-of-list Python实现 # Definiti…
*勿以浮沙筑高台* 持续更新........ 题目网址:https://leetcode.com/problemset/all/?difficulty=Easy 1. Two Sum [4ms] 2. Reverse Integer [12ms] 题意:将一个32bit signed integer反转输出,如果反转之后超出32位补码范围 [-2^31,2^31-1],则输出0 思路:边取模边算结果,结果存longlong判界 3. Palindrome Number [112ms]…
Sum 系列题解 Two Sum题解 题目来源:https://leetcode.com/problems/two-sum/description/ Description 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 sol…
题目:Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). For example,S = "ADOBECODEBANC"T = "ABC" Minimum window is "BANC". Note:If there is no such windo…
本博客是个人原创的针对leetcode上的problem的解法,所有solution都基本通过了leetcode的官方Judging,个别未通过的例外情况会在相应部分作特别说明. 欢迎互相交流! email: tomqianmaple@gmail.com 后续更多的easy题已经不属于Top Interview Questions,所以现在就不集中精力去做了,只做到目前的100题左右. Palindrome Linked List Lowest Common Ancestor of a Bina…