+ 1
[ALGORITHMS]
Post algos to challenges, patterns etc in the format ..description ..algo i will post some interesting algos here. feel free to post yours
4 Respuestas
+ 4
The kmeans clustering method is a specific clustering method, which you need to specify k, the amount of cluster that should be formed.
Step 1:
The algorithm starts by setting k centroids (cluster middle points) randomly in the data plot.
Step 2:
Then all data point will be assign (connected) to the nearest centroid.
Step 3:
Then each centroid moves to the middle of its assigned points.
Step 2 and 3 will be repeated until no changes between step 2 and 3 centroid/points will be, or after a set of iterations.
https://www.sololearn.com/discuss/501127/?ref=app
+ 2
nice but this thread more for explaining the logic behind
+ 1
A few that I'm really proud of:
One Time Pad Cipher. Wasn't part of a challenge, did it for funsies.
https://code.sololearn.com/cmgeSu08hH4f/?ref=app
One Time Pad/Cesar Cipher Decryptor. Takes two string inputs, an encrypted message using a One Time Pad cipher, and that message's pad encrypted using a cesar cipher. It decrypts the pad first, then uses the decrypted pad to decrypt the message.
https://code.sololearn.com/cNgEVwHYWfpV/?ref=app
Permutation finder. Uses Heap's Algorithm to find all possible permutations in an array of any length.
https://code.sololearn.com/cp3X62Tv6X11/?ref=app
+ 1
excellent @martin