Ad
  • Custom User Avatar
  • Custom User Avatar

    I would greatly recommend joining Codewars Discord and its #help-solve channel, because it is much easier to discuss all problems there. But generally your issue boils down to: if the first element is different from the second element, how would you tell which one of the two is an outlier?

  • Custom User Avatar

    What a suprise seeing you again hobovsky. Thanks for the explanation, but im struggling on how else to identify that it is the odd one out.

  • Custom User Avatar

    Your solution has a bug which fails in some specific scenarios:

    Your function assumes that the unique value will never be at the first index, but in some test cases, the unique number can appear at the beginning. Because you only compare each element to the first one, you incorrectly return a duplicate value when the single different value is at position 0.

    You need to consider cases where the unique value isn't always somewhere after the first repeated value. Review your approach for correctly identifying the unique number regardless of its position in the array.

    Some time ago I created a browser extension for Codewars which tries to help confused users and explain them, in a spoiler-free way, why their solution does not pass tests. Maybe you would find it helpful?

    Additionally, if you want to post code and keep indentation, you need to use code blocks.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Please dont post solutions in the discourse

  • Custom User Avatar

    Hi dfhwze, Im not firing any shots at anyone. I do appreciate everyones help. I originally posted my solution here unknowingly as I thought this space was to share ideas and I was pleased with my code as i found it simple. I didn't know it was a big deal. So i again apologise. I had only stated what i had felt at the time, it was not a nasty jab at others. Lets move on.

    Happy coding.

  • Custom User Avatar

    You just couldn't resist firing off one last shot, could you?

    Three people went out of their way to clarify that you weren't being belittled-just welcomed as a newcomer. A moderator even took the time to demonstrate how things work here, and did so with genuine respect. Rowcased's closing remarks should have wrapped things up on a positive note.

    But instead, you had to return with one final, nasty jab at other users-including the very mod who was trying to help you-by insinuating that only the last person showed you any kindness.

    Enough with the victim act. Pull yourself together and dive into the many wonderful code challenges waiting for you. There's a world of learning and growth ahead! Remember, those who you feel are "belittling" you are actually here to help whenever you need assistance. If you want even more support, you can always turn to our Discord channel and ask for assistance.

    Happy coding, newbie.

  • Custom User Avatar

    Hey rowcased, thanks a lot. As someone who recently joined the community, I felt like your the only one who has had some sympathy for me and understood my mistake rather then belittling me for it.

  • Custom User Avatar

    Honestly, I don't see any escalation here. I see a sharing of information void of disrespecful intention. There are a lot of people here willing to help.

    Welcome to Codewars!

  • Custom User Avatar

    woah, guys i didnt want this to escalate. I apologise for js trying to show my code because i was proud of myself and wanted to share my personal acomplishment, even tho to others it may not seem impressive but to me i thought it was. However i realise now that this space is not the place.

  • Custom User Avatar

    "newbie" is not a derogatory term, it just means someone who is new in some place, platform, or a community. You said yourself that you are new here, and there are some resources dedicated to help new users, like docs linked by dfhwze (including this paragraph and its third bullet point), or Codewars Discord.

    I am not sure I agree with "other people post solutions here and no one else complained", and I believe that out of 10 posts with spoilers, 10 is hidden, and ~7 is accompanied by a reply asking to not share solutions. If you see a post with a spoiler which is not hidden, feel free to use the "Spoiler" button and mark it as such. While general hints like "dont get mislead by overcomplicated problem statement" and similar are generally OK, we try to keep discourses clean from blatant spoilers like a ready-to-submit code, because this is usually counter-productive.

    I would also be extra cautious with posts like "hey, look at my great solution!" because it might not always be the case. Actually, the presented code, as short as it is, already contains a couple of problems, including stylistic ones, and performance issues. This is totally okay tho, because we are all here to learn. But there is a reason why sometimes longer and more complicated solutions are considered better, and there are good lessons waiting to be learned from them.

  • Custom User Avatar

    Yes, it just means "newcomer" to the platform.

  • Custom User Avatar

    newbie means beginner you said yourself you are new here

  • Custom User Avatar

    Why are you calling me a newbie? Im trying to be respectful and i apologise for my actions due to my lack of knowledge. I appreciate the help but i find your comment unnecessarily mean and rude. :(

  • Loading more items...