You are viewing a single comment's thread. Return to all comments →
For Mysql using the RECURSIVE statement:
WITH RECURSIVE cnt (n) AS ( SELECT 20 UNION ALL SELECT n - 1 FROM cnt WHERE n > 1 ) SELECT REPEAT("* ", n) FROM cnt;
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Draw The Triangle 1
You are viewing a single comment's thread. Return to all comments →
For Mysql using the RECURSIVE statement:
WITH RECURSIVE cnt (n) AS ( SELECT 20 UNION ALL SELECT n - 1 FROM cnt WHERE n > 1 ) SELECT REPEAT("* ", n) FROM cnt;