How do you copy and paste a test case that is a long array? There is no way to expand or highlight an input that runs off the end of the screen. You used to be able to click the input to expand it, but that no longer works.
I think for me it still works, but sadly not as conveniently as until recently. It used to be a single click selecting the whole input. Now I need to double- or triple-click and drag.
Really it still works for you? I can't seem to highlight the entire array pass the ellipses. I've looked in the HTML source and the whole array is not even loaded in the page sometimes.
@david120 Can you tell the problem and show your code so I can try to replicate it better?
@StefanPochmann I've been going through some older problems that I never did. In particular I was working on #135 Candy. My code is as follows:
def candy(self, ratings): """ :type ratings: List[int] :rtype: int """ if not ratings: return 0 N = len(ratings) dp = *N def helper(i): if i == N-1: return dp[N-1] if ratings[i] < ratings[i+1]: dp[i+1] = dp[i] + 1 helper(i+1) elif ratings[i] > ratings[i+1]: dp[i] = max(dp[i], helper(i+1) + 1) else: dp[i+1] = dp[i] helper(i+1) return dp[i] helper(0) return sum(dp)
OJ tells me that I have a Runtime Error, but it doesn't give any line number where the code breaks. I'm sure I'm just doing something stupid, but I can't debug since I can't highlight the entire test case.
@david120 Ok, I just tried that.
In the Edge browser, triple-click did select the whole array (about 39000 bytes, ending in
,4099,8]) and ctrl-C and ctrl-V got the whole thing. Right-clicking and using "Inspect Element" also showed me the whole data.
In Chrome, both ways are cut off after 10000 bytes (ending in
,6774,5297…). So way more than what's shown on the page, but not everything.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.