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

2018年11月21日

路径总和
摘要: Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. N 阅读全文
posted @ 2018-11-21 19:27 Bipolard 阅读(181) 评论(0) 推荐(0)
 
对称二叉树
摘要: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmet 阅读全文
posted @ 2018-11-21 19:21 Bipolard 阅读(119) 评论(0) 推荐(0)
 
二叉树的最大深度
摘要: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest l 阅读全文
posted @ 2018-11-21 19:13 Bipolard 阅读(111) 评论(0) 推荐(0)
 
二叉树的层次遍历
摘要: Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example:Given binary tree [3 阅读全文
posted @ 2018-11-21 18:58 Bipolard 阅读(115) 评论(0) 推荐(0)
 
两个数组的交集 II
摘要: Given two arrays, write a function to compute their intersection. Example 1: Input: nums1 = [1,2,2,1], nums2 = [2,2] Output: [2,2] Example 2: Input: n 阅读全文
posted @ 2018-11-21 13:39 Bipolard 阅读(110) 评论(0) 推荐(0)
 
字符串中的第一个唯一字符
摘要: 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 = "leetcode" return 0. 阅读全文
posted @ 2018-11-21 13:33 Bipolard 阅读(140) 评论(0) 推荐(0)
 
两个列表的最小索引总和
摘要: Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list of favorite restaurants represented by strings. You need to h 阅读全文
posted @ 2018-11-21 13:28 Bipolard 阅读(155) 评论(0) 推荐(0)
 
两数之和
摘要: 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 ex 阅读全文
posted @ 2018-11-21 13:16 Bipolard 阅读(210) 评论(0) 推荐(0)
 
两个数组的交集
摘要: Given two arrays, write a function to compute their intersection. Example 1: Input: nums1 = [1,2,2,1], nums2 = [2,2] Output: [2] Example 2: Input: num 阅读全文
posted @ 2018-11-21 12:07 Bipolard 阅读(294) 评论(0) 推荐(0)
 
只出现一次的数字
摘要: Given a non-empty array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runti 阅读全文
posted @ 2018-11-21 12:00 Bipolard 阅读(131) 评论(0) 推荐(0)
 
存在重复元素
摘要: Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the arr 阅读全文
posted @ 2018-11-21 11:51 Bipolard 阅读(129) 评论(0) 推荐(0)
 
杨辉三角
摘要: Given a non-negative integer numRows, generate the first numRows of Pascal's triangle. In Pascal's triangle, each number is the sum of the two numbers 阅读全文
posted @ 2018-11-21 09:21 Bipolard 阅读(317) 评论(0) 推荐(0)
 
 

公告


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