Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
重複の可能性: らせん状にループする
任意の高さと幅のグリッドが与えられたら、らせん状にトラバースするアルゴリズムを記述します。(左上から始まり、中央で終わる)以前に訪問したノードを通過しません。ネストされたループを使用しない場合。
1 つの for ループを使用して、左下から開始する必要があります。