• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
xiaoba1203
记录leetcode之路
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

随笔分类 -  leetcode

上一页 1 2 3 4 5 6 ··· 9 下一页

leetcode 历程
 
leetcode 208. Implement Trie (Prefix Tree) 设计前缀树 ---------- java
摘要:Implement a trie with insert, search, and startsWith methods. Note:You may assume that all inputs are consist of lowercase letters a-z. 设计一个前缀树,包括inse 阅读全文
posted @ 2017-03-28 10:28 xiaoba1203 阅读(129) 评论(0) 推荐(0)
leetcode 207. Course Schedule 课程计划 ---------- java
摘要:There are a total of n courses you have to take, labeled from 0 to n - 1. Some courses may have prerequisites, for example to take course 0 you have t 阅读全文
posted @ 2017-03-27 19:48 xiaoba1203 阅读(1085) 评论(0) 推荐(0)
leetcode 206. Reverse Linked List 反转链表 ---------- java
摘要:Reverse a singly linked list. 阅读全文
posted @ 2017-03-25 13:33 xiaoba1203 阅读(476) 评论(0) 推荐(0)
leetcode 205. Isomorphic Strings 判断两个字符串能否互相转换 ---------- java
摘要:Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occurrenc 阅读全文
posted @ 2017-03-24 18:52 xiaoba1203 阅读(228) 评论(0) 推荐(0)
leetcode 204. Count Primes 找出素数的个数 ---------- java
摘要:Description: Count the number of prime numbers less than a non-negative number, n. 找出小于n的素数个数。 1、用最淳朴的算法果然超时了。 2、埃拉托斯特尼筛法Sieve of Eratosthenes 我们从2开始遍 阅读全文
posted @ 2017-03-24 18:11 xiaoba1203 阅读(480) 评论(0) 推荐(0)
leetcode 203. Remove Linked List Elements 删除链表中的某个值 ---------- java
摘要:Remove all elements from a linked list of integers that have value val. ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6Return: 1 --> 2 -- 阅读全文
posted @ 2017-03-24 17:33 xiaoba1203 阅读(147) 评论(0) 推荐(0)
leetcode 201. Bitwise AND of Numbers Range 求范围中,每一位都是1的数 ---------- java
摘要:Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive. For example, given the range [5, 阅读全文
posted @ 2017-03-24 16:55 xiaoba1203 阅读(127) 评论(0) 推荐(0)
leetcode 200. Number of Islands 求岛的数量 ---------- java
摘要:Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacen 阅读全文
posted @ 2017-03-24 15:33 xiaoba1203 阅读(453) 评论(0) 推荐(0)
leetcode 199. Binary Tree Right Side View 求所能看到的叶子节点 ---------- java
摘要:Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. For exa 阅读全文
posted @ 2017-03-24 12:51 xiaoba1203 阅读(131) 评论(0) 推荐(0)
leetcode 198. House Robber 求抢劫的最大金额 ---------- java
摘要:You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo 阅读全文
posted @ 2017-03-24 12:39 xiaoba1203 阅读(269) 评论(0) 推荐(0)
leetcode 191. Number of 1 Bits 求二进制1的个数 ---------- java
摘要:Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight). For example, the 32-bit 阅读全文
posted @ 2017-03-24 11:20 xiaoba1203 阅读(129) 评论(0) 推荐(0)
leetcode 190. Reverse Bits (int)数字旋转 ---------- java
摘要:Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), retur 阅读全文
posted @ 2017-03-24 11:11 xiaoba1203 阅读(204) 评论(0) 推荐(0)
leetcode 189. Rotate Array 数组旋转 ---------- java
摘要:Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4]. 就是把 阅读全文
posted @ 2017-03-23 23:02 xiaoba1203 阅读(293) 评论(0) 推荐(0)
leetcode 187. Repeated DNA Sequences 求重复的DNA串 ---------- java
摘要:All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to 阅读全文
posted @ 2016-12-21 21:15 xiaoba1203 阅读(195) 评论(0) 推荐(0)
leetcode 186. Reverse Words in a String II 旋转字符数组 ---------- java
摘要:Given an input string, reverse the string word by word. A word is defined as a sequence of non-space characters. The input string does not contain lea 阅读全文
posted @ 2016-12-11 17:10 xiaoba1203 阅读(384) 评论(0) 推荐(0)
leetcode 179. Largest Number 求最大组合数 ---------- java
摘要:Given a list of non negative integers, arrange them such that they form the largest number. For example, given [3, 30, 34, 5, 9], the largest formed n 阅读全文
posted @ 2016-12-08 12:15 xiaoba1203 阅读(418) 评论(0) 推荐(0)
✡ leetcode 174. Dungeon Game 地牢游戏 --------- java
摘要:The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a 阅读全文
posted @ 2016-12-08 00:03 xiaoba1203 阅读(1101) 评论(0) 推荐(0)
✡ leetcode 173. Binary Search Tree Iterator 设计迭代器(搜索树)--------- java
摘要:Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the n 阅读全文
posted @ 2016-12-07 17:59 xiaoba1203 阅读(660) 评论(0) 推荐(0)
✡ leetcode 172. Factorial Trailing Zeroes 阶乘中的结尾0个数--------- java
摘要:Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logarithmic time complexity. 主要是思考清楚计算过程: 将一个数进行因式分解, 阅读全文
posted @ 2016-11-30 21:52 xiaoba1203 阅读(124) 评论(0) 推荐(0)
✡ leetcode 171. Excel Sheet Column Number 字母转换为数字 --------- java
摘要:Related to question Excel Sheet Column Title Given a column title as appear in an Excel sheet, return its corresponding column number. For example: 很简 阅读全文
posted @ 2016-11-30 17:28 xiaoba1203 阅读(209) 评论(0) 推荐(0)
 

上一页 1 2 3 4 5 6 ··· 9 下一页

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3