# Time and space complexity of the following algorithm and Purpose

Hello experts,

I am confused about the following algorithm in terms of time and space complexity as well as the purpose: Can you find and explain the above mentioned terms of the algorithm.

Mystic Algorithm

๐๐๐๐๐๐๐ข๐๐๐๐ฆ๐ ๐ก๐๐๐ฆ๐ด๐๐(๐ฅ,๐)

๐๐ ๐=0 ๐กโ๐๐

๐๐๐ก๐ข๐๐ 1

๐๐๐ ๐๐

๐๐ ๐=1 ๐กโ๐๐

๐๐๐ก๐ข๐๐ ๐ฅ

๐๐๐ ๐๐

๐๐ ๐ ๐๐ ๐๐ฃ๐๐ ๐กโ๐๐

๐๐๐ก๐ข๐๐๐๐ฆ๐ ๐ก๐๐๐ฆ๐ด๐๐(๐ฅโ๐ฅ,๐2)

๐๐๐ ๐

๐๐๐ก๐ข๐๐ ๐๐ฆ๐ ๐ก๐๐๐ฆ๐ด๐๐(๐ฅโ๐ฅ,๐2)โ๐ฅ

๐๐๐ ๐๐ ๐๐๐ ๐๐๐๐๐๐๐ข๐๐

## Comments

Hey! I was about to suggest to use the algo forums for this question, but I see you are ahead of time and posted over there already.

I wish I knew the answer, all I can say for now is: welcome! I'll try to get some help.