[LeetCode]Print in Order

题目描述:

LeetCode 1114. Print in Order

Suppose we have a class:

public class Foo {
  public void first() { print("first"); }
  public void second() { print("second"); }
  public void third() { print("third"); }
}

The same instance of Foo will be passed ...

继续阅读

[LeetCode]Next Greater Node In Linked List

题目描述:

LeetCode 1019. Next Greater Node In Linked List

We are given a linked list with head as the first node.  Let's number the nodes in the list: node_1, node_2, node_3, ... etc.

Each node may have a next larger value ...

继续阅读

[LeetCode]Numbers With Repeated Digits

题目描述:

LeetCode 1015. Numbers With Repeated Digits

Given a positive integer N, return the number of positive integers less than or equal to N that have at least 1 repeated digit.

Example 1:

Input: 20
Output: 1
Explanation: The only ...

继续阅读

年度归档