LeetCode icon indicating copy to clipboard operation
LeetCode copied to clipboard

Update Generate.java

Open xbz opened this issue 10 years ago • 4 comments

  1. a typo: class name should be Solution :)
  2. There is no need to check "if (numRows <= 0)"

xbz avatar Oct 22 '14 08:10 xbz

  1. The class name should be the same. Why does the class name should be the same? I'm confused. this code can't pass the leetcode online judge.

xbz avatar Oct 22 '14 08:10 xbz

you Can add my QQ 215573479

On Wednesday, October 22, 2014, xbz [email protected] wrote:

  1. The class name should be the same. Why does the class name should be the same? I'm confused. this code can't pass the leetcode online judge.

— Reply to this email directly or view it on GitHub https://github.com/yuzhangcmu/LeetCode_algorithm/pull/2#issuecomment-60054192 .

yuzhangcmu avatar Oct 22 '14 08:10 yuzhangcmu

  1. The file name is the Generate. When you paste it in the Leetcode, you should change the name.

    But the code is ran in the Eclipse.

On Oct 22, 2014, at 1:50 AM, xbz [email protected] wrote:

The class name should be the same. Why does the class name should be the same? I'm confused. this code can't pass the leetcode online judge. — Reply to this email directly or view it on GitHub.

yuzhangcmu avatar Oct 22 '14 08:10 yuzhangcmu

sorry, i'm not a Java coder and think it's a bug.

xbz avatar Oct 22 '14 09:10 xbz