Revealing Test Cases

Hello Guys! I am doing problem solving for 5 months and in these months I have visited various websites like hackerrank,leetcode,codewars and so on. I also solve problems in those sites and I also appreciate Toph. But I also want to suggest some thing about test cases. I have seen in almost all websites that they don’t hide test cases(except some competitive programming sites where basically organizations arrange contests). And my overall inspection about Toph is that it is a biginner friendly website. Here all beginner level programmers solve problems. But if you don’t show the problems and errors in submissions then people can’t understand much why the code is not efficient.And one of the best website for competitive programming leetcode also reveals the test cases so that we can find out where is the problem.

Thats all guys!

4 Likes

This has come up a few times in some one-to-one discussions that I have had about Toph with others.

I am in favor of revealing test cases and also allowing solvers to suggest test cases (for problems with potentially weak test suites).

Having said that, I am curious to know what the community thinks about it.

Should we make test cases visible for problems in the archive?
  • Reveal test cases
  • Keep test cases hidden

0 voters

3 Likes

@hjr265 maybe a thrid option is needed. Reveal test cases after solve? My vote is 50% reveal test cases and 50% reveal after solving. And of course I will am vouching for suggest test cases feature. However, that should be limited to solvers.

3 Likes

In my opinion, the sample test cases need to be strong.

I am solving problems in toph for more than a year and I have seen that most of the problems contain only one simple test case. It’s true that sometimes we even understand the problem more clearly seeing the sample test cases but only one simple test case is not quite enough always. So, it would be a lot better if every problem contains three sample test cases along with one or two explanations where the sample test cases need to be strong containing all possibilities including corner ones so that if we can pass them we can pass the submissions most of the time without any wrong answer.

1 Like

@hjr265 The decision is equal votes for revealing test cases and hide test cases. So, I think you should keep unhidden half of the test cases and half hidden.

2 Likes

Lol. Although I thought that revealing Test cases after solving would be the right Idea, I voted against revealing Test Cases as the first person quickly to draw crowd, Haha. Thought that If the initial vote was not cast people would just blindly vote in agreement, Lol.

It happens, whenever a product asks its users about a new feature most people are just like ‘Yeah Yeah we want it Now!’. But in reality only a few people thinks about it before voting.

Thus I even saw that some game only accepted new features if it got like 70% or more votes.

Thus, I think in this case the people that voted against this feature have actually put some thought in it. And Toph should not reveal test cases.

Or, reveal them after solving like most other online Judges out there.

Do you use the Leetcode which is one of the best websites for interview preparation and as well as competitve programming?

This website provide the test case which is affected by WA or TLE.As well as, it also provides the test cases in the contests. If these big websites can reveal test cases then why not toph? I said they just have to reveal half of the test case which is useful to go over all the test cases.Otherwise, It will nothing but an annoying matter

Dunno. I am a NOOB too.

1 Like

Who is not noob here I am also

I really like the way Codeforces reveals test cases when someone submits their code. It shows all the test cases up to and including the one that caused a WA.

I think Toph could adopt a similar approach. If Toph revealed all the test cases when someone submits, it might not be as effective. But if Toph showed all the test cases leading up to the failed one, it would be much more helpful and user-friendly.

P.S: I wasn’t sure if I should bump a discussion that’s two years old. :sweat_smile:

3 Likes

I am glad you bumped this topic. I also think that revealing test cases helps those who want to learn.

Thank you for the suggestion around revealing test cases only up to the first non-accepted case. I think that is the way I would like to implement this feature as well.

Let me start planning around this.

3 Likes

two years ago I was kinda noob. I didn’t thought about that thing that not revealing the test cases would help you to go deeper to the problems and find your lacking.I also support the idea of revealing the test cases if a user fails to solve the problem in at least 10/5 attempts.Cause first submission is sheer simple thinking but after failing to solve the problem in one go he will go deeper to the problem and will finally solve the problem. and if a user fails to solve that problem after 5(it actually depends ) submissions, it will signify that he is unable to solve the edge cases or his way of thinking isn’t right.This will help the users to learn and will help the users to get relief from depression of not being able to solve the problem(at least its my case). I hope you will hear this out