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.
In my opinion description is a bit unclear and written in a way that is misleading / difficult to understand
Here's a simplified version of the task description:
"You have a string made up of the letters 'D', 'P', and 'C'. Your task is to find the smallest positive number, N, that satisfies certain rules based on the string. Here are the rules:
For each position in the string (let's call this position 'i'), do the following based on the character at that position:
Find the smallest number N that satisfies all the rules for the given string. If no such number exists, return -1. The number N should be less than or equal to 1 billion (1,000,000,000)."
Wouldn't it be better to add in the description that the correct answer for middlePyramid is 1074 not 1064? As many people thinks it's an issue it would laso be good to add some hints like that it is based on "Greedy algorithm" or that you should use dynamic programming technic to solve it? I understand that it is good practive to look for an answer however in order to catch a fish you need a fishing rod first.
This comment is hidden because it contains spoiler information about the solution
Don't look at it
I already admitted to mistake. There is no need to continue this topic.
The worst code I have ever written... I am proud of it
This comment is hidden because it contains spoiler information about the solution
I have to say that you are right. The problem I have with these is that I can have a good idea and solution for first few tests but then it's not fast enough and I can't find a way to make it faster :/ (In this particular case I don't even use a loop)
Idk these "Math" katas are diffrent from other katas because you can have working code but you will not pass it only beacuse it's not fast enough. It's like having a car race you both have cars, you both making the same distance but if your opponent has a ferrari and all you have is opel astra you will still lose even tho you did nothing wrong. It's just annoying.
God damn
Why in this example "2000 10003 1234000 44444444 9999 11 11 22 123"
=> 11 should be before 2000 but 22 shouldn't be before 10003?
Result /"11 11 2000 10003 22 123 1234000 44444444 9999"/
Alright done it but I hate it when understanding the issue takes 5x times longer than the actual coding
Good luck solving this shit in c#. Your code may work fine but then you are submitting it and getting colossal numbers that can't be procceded. This kata is joke.
soo true dude
It was good kata.
For these that didn't complete yet, remember that string can be empty :>
Loading more items...