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.
k-ary ツリーの幅を見つける必要があります。幅は任意のレベルのノードの最大数です。私はC++でそれをしなければなりません。私は BFS の修正版を考えましたが、うまくいきませんでした。これを行う方法についてのアイデアはありますか?
最大数は k^depth で、ルートは depth==0 です。使用上限ということですか?