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

2017年3月24日

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 阅读(232) 评论(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 阅读(482) 评论(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 阅读(153) 评论(0) 推荐(0)
 
leetcode 202. Happy Number 判断一个数是否是“Happy Number” ---------- java
摘要: 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 intege 阅读全文
posted @ 2017-03-24 17:16 xiaoba1203 阅读(306) 评论(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 阅读(132) 评论(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 阅读(456) 评论(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 阅读(133) 评论(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 阅读(277) 评论(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 阅读(136) 评论(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 阅读(205) 评论(0) 推荐(0)
 
 

公告


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