Answer the question
In order to leave comments, you need to log in
How to create all sorts of triangles up to N?
for example sides i,j,k; need i^j^k==0 && i+j>k && ij, fast solution, not O(n^3)
Answer the question
In order to leave comments, you need to log in
If i^j^k==0, then k = i^j. Accordingly, it is enough to enumerate two parameters, which gives O (n ^ 2).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question