Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
maybe it's a school network that thinks imgur is cool to block
or maybe a country with a dysfunctional government (could arguably describe every government but some more so than others)
this is the url: https://i.imgur.com/36x8Fkv.png
even ignoring site blocking, external sites isn't ideal, unless it's something super reliable like wikipedia
white space is a typo of whitespace and doesn't mean what you use it for.
that character's name is space.
issuebecause it's misleading in a way that isn't relevant to the task (as opposed to clever phrasing), lowers the quality of the problem, and will teach beginners something that is wrong.
please remove all occurrences of "white" from the description and tests.
The examples should be an image or ascii/unicode visualisation instead, so that the solver does not need to wonder whether it contains hidden information in its text, and to make it easier to parse in general.
All the rest of the instructions below the rules table should be replaced with an explanation of what part of the data to return, that current text is difficult to read and says nothing.
The wikipedia mention should instead be a hyperlink for the first two words "Rule 30" so as to not make the solver question whether there is required information there that the instructions leave out. Also improves signal-to-noise ratio.
What, leetcode doesn't tell you when your code is wrong?
Are you looking at what the input was? Otherwise you can't state that you've reversed them, not knowing the original order.
You're free to print out information about what's going on in your code. You can print out things like what the input to your method was, and what value your method returns. That way you can manually judge whether your method does what it's supposed to, and whether that agrees with the error report that you're getting.
It also doesn't matter whether the input is a reversed English word, or a word at all. The input can therefore never be "reversed to begin with" as nothing is supposed to be in any particular order in the input.
limiting the queue size to 500 is arbitrary and suspicious. I ran your code to see if it hit that limit, it does. there's no way that's a correct thing to do.
(either the limit isn't needed, and then it's irrelevant to limit it, or, it is needed, but then that wouldn't be a correct way to handle it)
You are probably misinterpreting your output, for example by mutating the input value so that it's no longer what you got or by looking at the input of one case and the expected output of another.
Having a failure share representation with success can lead to failures accidentally being treated as success. By making them different you make it difficult or impossible to mix them up.
If not knowing about the possible None, that is still better than not knowing about the possible -1, being forced to deal with it is the whole point.
If 0 can be considered a success then keeping it as int makes sense. A square having a side of -1 would be something very different though.
If the sentiment is that you don't like mixing types, then I would still consider int|NoneType to be a single type, a union of two others. Exceptions are another way to represent that, again keeping failure and success separate.
(It still says brake btw)
string? the data types involved are int and int array, and there's nothing about
"-"in the problem description, are you posting on the right problem?
is that the full error message or are you just giving a small part of it out of context? what language is it? better yet, how can others get the same error message? if you print out input as well as your own input, does your program appear to do what it should?
Passes for me. Maybe you have spaces in places they shouldn't be - compare more carefully.
In general, please provide enough information for others to reproduce the problem when you create an
issue. Stating that you are not passing is usually not enough for it to be actionable.
@MiloDC could you uh apply some basic manners to the messages you post? Thanks.
There's no test ruling out a list representation, no.
Myeveryone's solution should probably be invalidated by performance tests that don't currently exist (making the kata pointless / 7 kyu)
not an issue with the kata
(and there are no quotes in your input string)
Loading more items...