演算法

[演算法題目] Node Depths

The distance between a node in a Binary Tree and the tree’s root is called the node’s depth. Write a function that takes in a Binary Tree and returns the sum of its nodes’ depths……

演算法

[演算法題目] Depth-first Search

You’re given a Node class that has a name and an array of optional children nodes. When put together, nodes form an acyclic tree-like structure…

演算法

[演算法題目] Sorted Squared Array

Write a function that takes in a non-empty array of integers that are sorted in ascending order and returns a new array o fthe same length with…

展覽

[展覽] 《吉卜力動畫大師-高畑勲展》:遠超出期待的動畫幕後展覽

身為一個愛看各種動畫的人來說,絕對不能錯過宣稱有大量手稿的展吧!記得高畑勲2018年過世時,相當多動畫迷非常震驚。而我反而是高畑勲過世後,才慢慢認識他的作品。除了螢火蟲之墓是小時候看的之外,其他幾乎沒什麼印象。這次的展覽是一個契機,讓我再次重新認識高畑勳這個日本動畫巨匠……

展覽

[展覽] 搞笑諾貝爾獎世界展-比較適合小朋友的展覽?

搞笑諾貝爾獎(Ig Nobel Prize)是由美國的科學雜誌《不可思議研究年報》主編 Marc Abrahams 於1991年創立,名字由來是「ignoble」這個詞,有令人感到羞恥的意思。相對於諾貝爾獎的高度學術性質帶來的嚴肅感,搞笑諾貝爾獎提供了較為輕鬆及幽默的角度看科學這檔事……

演算法

[演算法題目] Invert Binary Tree

Write a function that takes in a Binary Tree and inverts it. In other words, the function should swap every left node in the tree for its corresponding right node…

展覽

[展覽] 《普立茲新聞攝影獎80週年展》:一張照片看盡世界角落

普立茲獎(Pulitzer Prize)可以說是全球新聞界的最高榮譽,喜歡攝影或是看國際新聞的人,一定都有聽過這個獎項。不過普立茲獎的作品會為人所知,通常是來自於較為負面的新聞為主,若隨便問一個人記得的普立茲獎,通常都是和戰爭、災難有關……

演算法

[演算法題目] Tournament Winner

Given an array of pairs representing the teams that have competed against each other and an array containing the results of each competition, write a function that returns the winner of the tournament……

演算法

[演算法題目] Tandem Bicycle

Write a function that returns the maximum possible total speed or the minimum possible total speed of all of the tandem bicycles being ridden based on an input parameter……