Skip to content

Latest commit

 

History

History
68 lines (30 loc) · 923 Bytes

README_EN.md

File metadata and controls

68 lines (30 loc) · 923 Bytes

中文文档

Description

You are building a diving board by placing a bunch of planks of wood end-to-end. There are two types of planks, one of length shorter and one of length longer. You must use exactly K planks of wood. Write a method to generate all possible lengths for the diving board.

return all lengths in non-decreasing order.

Example:

Input: 

shorter = 1

longer = 2

k = 3

Output:  {3,4,5,6}

Note:

  • 0 < shorter <= longer
  • 0 <= k <= 100000

Solutions

Python3

Java

...