Publish Date : 2020-03-02 13:28 題目: The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, calculate the Hamming distance. 範例: Input: x = 1, y = 4Output: 2Explanation:1 (0 0 0 1)4 (0 1 0 0) ↑ ↑The above arrows point to positions where the corresponding bits are
Publish Date : 2020-02-24 14:10 題目: Given an array of integers A sorted in non-decreasing order, return an array of the squares of each number, also in sorted non-decreasing order. 範例: Input: [-4,-1,0,3,10]Output: [0,1,9,16,100] Input: [-7,-3,2,3,11]Output: [4,9,9,49,121] 在LeetCode中使用Golang的庫很方便 不用impo
Publish Date : 2020-02-21 14:00 題目: Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not. You need to merge them into a new binary tree. The merge rule is that if two nodes overlap, then sum node values up as the new value of the merged node.
Publish Date : 2020-02-19 15:48 Given the root node of a binary search tree, return the sum of values of all nodes with value between L and R (inclusive). The binary search tree is guaranteed to have unique values. Input: root = [10,5,15,3,7,null,18], L = 7, R = 15Output: 32 目前遇到BST類型的題目都是有關遞迴的 /**
Publish Date : 2020-02-19 10:23 在舊站時期的時候 有發表了一篇Node-RED + uibuilder + vue顯示網頁的教學 隨著Node-RED更新 uibuilder主版本其實也早就更
Publish Date : 2020-02-17 09:44 題目: On a plane there are n points with integer coordinates points[i] = [xi, yi]. Your task is to find the minimum time in seconds to visit all points. You can move according to the next rules: * In one second always you can either move vertically, horizontally by one unit or diagonally (it means to move one unit vertically and one unit
Publish Date : 2019-12-20 10:16 題目: Balanced strings are those who have equal quantity of ‘L’ and ‘R’ characters. Given a balanced string s split it in the maximum amount of balanced strings. Return the maximum amount of splitted balanced strings. example: Input: s = “RLRRLLRLRL”
Publish Date : 2019-12-18 11:15 Golang對網路來說是門友善的語言 對於UI 其實搭配使用web的方式會比較好 擴展性高,支援多個平台 但桌面型式的UI(GUI)在目前
Publish Date : 2019-12-18 10:23 題目: Given head which is a reference node to a singly-linked list. The value of each node in the linked list is either 0 or 1. The linked list holds the binary representation of a number.Return the decimal value of the number in the linked list. Golang的解法: 看Hint1是
Publish Date : 2019-11-26 12:04 桌面應用的框架很多 像是C++的Qt等等 有一個只要會前端就會寫的桌面應用框架 且也是跨平台的(這個很重要,讓你在開發程式的時候不用開發