文章 2018-03-31 来自:开发者社区

【LeetCode-面试算法经典-Java实现】【111-Minimum Depth of Binary Tree(二叉树的最小深度)】

原题   Given a binary tree, find its minimum depth.   The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.  题目大意   给定一棵两叉树求树的最小深度。...

文章 2017-11-12 来自:开发者社区

Leetcode 258. Add Digits JAVA语言

1 2 3 Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For exam...

文章 2017-11-12 来自:开发者社区

Leetcode 383. Ransom Note JAVA语言

1 2 3 4 5 6 7 Given an arbitrary ransom note string and another string containing letters from all the magazines, write ...

文章 2017-11-12 来自:开发者社区

Leetcode 415. Add Strings JAVA语言

1 2 3 4 5 6 Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: ...

文章 2017-11-12 来自:开发者社区

Leetcode 91. Decode Ways JAVA语言

1 2 3 4 5 6 7 8 9 10 11 12 A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A'&nbsp...

文章 2017-11-12 来自:开发者社区

Leetcode 263. Ugly Number JAVA语言

1 2 3 Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose&nb...

文章 2017-11-12 来自:开发者社区

Leetcode 155. Min Stack JAVA语言

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Design a stack that supports push, pop, top, and retrieving the minimum element in co...

文章 2016-05-05 来自:开发者社区

LeetCode: Min Stack 最小栈 Java

题目描述: Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- Removes the element on top of the stack. top() .....

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。

产品推荐

Java开发者

Java开发者成长课堂,课程资料学习,实战案例解析,Java工程师必备词汇等你来~

+关注