- 博客(9)
- 资源 (1)
- 收藏
- 关注
原创 判断“资源字符串”是否可以构成“目标字符串”
题目:Ransom Note描述:Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the ransom note can be constructed from th
2016-10-30 21:56:39 945
原创 删除单向链表中的某个节点
题目:Delete Node in a linked List描述:Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Supposed the linked list is 1 -> 2 -> 3 -> 4 and you are
2016-10-30 20:15:50 10905 3
原创 求二叉树的所有末级左节点的值的和
题目:Sum of Leaves描述:Find the sum of all left leaves in a given binary tree. Example: 3 / \ 9 20 / \ 15 7There are two left leaves in the binary tree, with values 9 and 15 resp
2016-10-30 19:38:20 699
原创 将数组中的0全部移动到末尾
题目:Move Zeroes描述:Given an array nums, write a function to move all 0’s to the end of it while maintaining the relative order of the non-zero elements. For example, given nums = [0, 1, 0, 3, 12], afte
2016-10-30 15:12:50 18019 6
原创 反转二叉树
题目:Invert Binary Tree描述:invert binary tree: 4 / \ 2 7 / \ / \ 1 3 6 9 to 4 / \ 7 2 / \ / \ 9 6 3 1翻译:将二叉树的左边和右边进行置换答案:/** * Definition for a b
2016-10-30 10:54:45 850
原创 二叉树的深度
题目:Maximum Depth of Binary Tree题目详情: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 leaf node.翻译:有一
2016-10-23 15:10:01 351
原创 寻找数组中唯一的数
题目:Single Number题目详情: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
2016-10-23 14:34:12 2330
原创 输入整数,返回数组,并代替某些位置的数
题目:Fizz Buzz题目详情:Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three it should output “Fizz” instead of the number and for the multiples of five o
2016-10-23 13:47:59 407
原创 字符串反序输出
题目:Reverse StringWrite a function that takes a string as input and returns the string reversed. Example: Given s = “hello”, return “olleh”. 答案:public class Solution { public String reverseString(
2016-10-23 13:23:50 3144
机器学习导论
2018-03-06
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人