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.
Could you explain why it has polynomial time complexity and not quadratic O(n^2)?
This code is based on metaprogramming in Ruby. Function define_method creates methods by itself. It works a bit like #define in C++.
https://apidock.com/ruby/Module/define_method
Maybe its been updated since your comment but the description does mention the arrays will be the same length.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution