xunalove的博客

时间是一个伟大的作者,它会给每个人写出完美的结局来。

排序:
默认
按更新时间
按访问量

壹玖考研媛日记(5月8日更新)

记录加计划。 数学(重基础) 5月更新: 寻找复习方法历程: 从三月到四月一直在找一种适合自己的数学的学习方法。 开始的时候认为教材很重要(确实很重要),埋头苦心开始看课本做课本上的例题和习题,直达四月中旬将高数上册做到第六章,第六章是关于定积分的应用,忽然发现书上的课后习题做起来十...

2018-03-26 21:12:39

阅读数:426

评论数:10

2018/3/6 寒假小记

寒假 本来想在刷leetcode满100道时,写这篇寒假总结呢,后来开学前去深圳玩了几天,第一次独自一人,第一次坐飞机,第一次去南方,有点小激动呀(傻的我还在知乎把第一次坐飞机要注意什么帖子都看了一下,但是,但是,实践还是和理论不一样,傍晚的飞机正好看到深圳的夜景,飞机上手机不能开机,没有留下美...

2018-03-06 22:31:56

阅读数:235

评论数:1

657. Judge Route Circle(路线圈)

题目 Initially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this robot makes a circle, which means it moves back to t...

2018-02-26 21:03:34

阅读数:116

评论数:0

520. Detect Capital(检测大写字母)

题目 Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usage of capitals in a word to be right when ...

2018-02-26 20:47:46

阅读数:234

评论数:0

383. Ransom Note(map容器)

题目 Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the...

2018-02-26 17:50:40

阅读数:103

评论数:0

387. First Unique Character in a String

题目 Given a string, find the first non-repeating character in it and return it’s index. If it doesn’t exist, return -1. Examples: s = "lee...

2018-02-26 17:32:48

阅读数:67

评论数:0

292. Nim Game(尼姆游戏)

题目 You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3...

2018-02-26 16:30:29

阅读数:180

评论数:0

350. Intersection of Two Arrays II(两数组交集)

题目 Given two arrays, write a function to compute their intersection. Example: Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2]. Note: E...

2018-02-26 00:15:07

阅读数:76

评论数:0

349. Intersection of Two Arrays(两数组的交集,vector中find()函数, 结果集去重)

题目 Given two arrays, write a function to compute their intersection. Example: Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2]. Note: Each...

2018-02-25 23:18:30

阅读数:77

评论数:0

242. Valid Anagram(有颠倒顺序构成的字符串---字符串排序(c++和python)

题目 Given two strings s and t, write a function to determine if t is an anagram of s. s = "anagram", t = "nagaram&...

2018-02-25 23:03:37

阅读数:122

评论数:0

204. Count Primes(厄拉多塞筛法--质数筛法)

题目 Description: Count the number of prime numbers less than a non-negative number, n. 题意 小于n的素数的个数。 题解 普通的筛法求素数超时。 提示中的一种解法:厄拉多塞筛法(https...

2018-02-25 22:57:44

阅读数:155

评论数:0

202. Happy Number(unordered_map)

题目 Write an algorithm to determine if a number is “happy”. A happy number is a number defined by the following process: Starting with any positive ...

2018-02-24 17:13:27

阅读数:60

评论数:0

455. Assign Cookies(分蛋糕--贪心)

题目 Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i ha...

2018-02-24 15:36:05

阅读数:91

评论数:0

303. Range Sum Query - Immutable(和累加法)

题目 Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Given nums = [-2, 0, 3, -5, 2, -...

2018-02-24 12:16:04

阅读数:64

评论数:0

198. House Robber(动态规划--房屋强盗)

题目 You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stoppi...

2018-02-24 11:47:23

阅读数:112

评论数:0

70. Climbing Stairs(爬楼梯)

题目 You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can ...

2018-02-24 11:13:29

阅读数:81

评论数:0

682. Baseball Game(栈的应用)

题目 You’re now a baseball game point recorder. Given a list of strings, each string can be one of the 4 following types: Integer (one round's score...

2018-02-24 00:53:17

阅读数:115

评论数:0

496. Next Greater Element I(下一个更大的元素)

题目 You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for n...

2018-02-23 23:56:35

阅读数:167

评论数:0

232. Implement Queue using Stacks(用栈模拟队列)

题目 Implement the following operations of a queue using stacks. push(x) -- Push element x to the back of queue. pop() -- Removes the element from in...

2018-02-23 22:44:30

阅读数:75

评论数:0

225. Implement Stack using Queues(用队列模拟栈)

题目 Implement the following operations of a stack using queues. push(x) – Push element x onto stack. pop() – Removes the element on top of the stac...

2018-02-21 14:25:26

阅读数:81

评论数:0

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