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.
There are so many solutions, it's mindblowing. I just had to delete my comment from before because only now i understand, what you did. I would love to hear your feedback to my task. I know now why Math.Abs didnt work. It was a stupid mistake i made.^^
First of all: Thanks a lot. I'll try it again on my own before i look at your solution.
My question is: Is any loop "bad" for the performance? Or is there a difference between for example for and while in terms of performance?
Im just thinking about how to solve without iteration. Give me some time, i need to do this on paper first :D
Ok danke. Die Foreachschleife hätte mit dem Array auch funktioniert oder? Ja ich habs jetzt langsam raus, wann using und wann nicht. Da geht es lediglich darum, die Methoden und Klassen (etc.?), die verwendet werden, bereitzustellen und das findet man eh auf Microsoft learn. So wie ich das verstanden habe, ist das was nach using kommt ein Namespace.
Performance is an important aspect in programming.
A solution with a loop (while) causes the processor to iterate several times through the loop and every iteration takes time.
If you find a solution without a loop you will have better performance.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
ich habe ein wenig gebraucht bis ich es richtig verstanden habe. Die Liste fängt mit "1" an oder? bei Arrays fängts ja bei "0" an. Da muss man immer ein wenig mitdenken welcher index was ist XD und das mit dem bFirst finde ich auch sehr interessant, weil es rückwärts zu wirken scheint XD. Echt cool. ich muss mir morgen nochmal die collections und generics zu gemüte führen. Vielen Dank für deine Mühe und schönen Abend noch
I didnt have a chance to run your code, but just reading it it seems to have insufficient time complexity and is most probably too slow.
Expected approach is O(n) in time, and O(1) in space, while your solution seems to be O(n^2) in time and O(n) in space.
Can anyone explain the terms of the assignment? It is more or less clear what should be at the output and it is not at all clear what is at the input. It is impossible to understand.
I was wondering when a first solution abusing this fact will appear. now i know :)
approved
Solutions based on hashing are restricted in some languages, they are not in some others, what should be fixed.
In general, a performant solution to this problem does not require hashing, it can be solved in O(n) time and O(1) space.
Citation: "Thanks to shadchnev, I broke all of the methods from the Hash class."
That means the Hashtable and GetHashCode won't work or is slowed down, right?
I am not exactly sure what your test with
nodes.Count < 1000
is trying to prove, but your code uses an inefficient approach which is expected to time out.Your solution being slow is not a kata issue.
Addressed with this fork, please verify.
Loading more items...