<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                >[danger]代碼題:實現一個convert函數,將扁平化的結構轉換成樹狀結構。 ~~~ const list = [ { key: 1, value: 'A', parentKey: 0 }, { key: 2, value: 'B', parentKey: 0 }, { key: 3, value: 'C', parentKey: 1 }, { key: 4, value: 'D', parentKey: 1 }, { key: 5, value: 'E', parentKey: 2 }, { key: 6, value: 'F', parentKey: 3 }, { key: 7, value: 'G', parentKey: 4 }, ]; ===> const tree = [ { key: 1, value: 'A', parentKey: 0, children: [ { key: 3, value: 'C', parentKey: 1, children: [ { key: 6, value: 'F', parentKey: 3 } ] }, { key: 4, value: 'D', parentKey: 1, children: [ { key: 7, value: 'G', parentKey: 4 } ] } ] }, { key: 2, value: 'B', parentKey: 0, children: [ { key: 5, value: 'E', parentKey: 2 } ] } ]; ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看