原创 如何識破“AI萬金油”

本文的目的是讓大家瞭解當前AI在各個領域的應用及發展情況,以此來識別網上那些打着AI的旗號進行各種不靠譜的評測和預測行爲,即“AI萬金油”騙術,防止大家被收智商稅。 一、爲什麼如今存在大量的”AI萬金油“騙術? AI是一系列相關技

原创 Merge Two Sorted Lists(合併兩個有序鏈表)

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nod

原创 Intersection of Two Arrays(兩數組的交叉元素)

Given two arrays, write a function to compute their intersection.(給定兩個數組,計算它們的交叉元素) Example: Given nums1 = [1, 2,

原创 Invert Binary Tree(反轉二叉樹)

Invert a binary tree.(反轉一棵二叉樹) 4 / \ 2 7 / \ / \ 1 3 6 9 to 4 / \ 7 2 / \

原创 Happy Number

Write an algorithm to determine if a number is “happy”.(判斷一個數字是否是”happy”) A happy number is a number defined by the

原创 Python實現生成西瓜數據集的Excel文件

爲了獲得《機器學習》(周志華)中的完整西瓜數據集,這裏通過Python使用xlwt模塊自動生成數據集的Excel文件。 實現代碼如下: import xlwt def createDataSet(): dataSet =

原创 Lowest Common Ancestor of a Binary Search Tree(二叉樹最小公共祖先)

Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.(給定一個二分查找樹,找到

原创 Power of Three

Given an integer, write a function to determine if it is a power of three.(給定一個整數,判斷其是否是3的冪) Follow up: Could you

原创 Best Time to Buy and Sell Stock(股票交易)

Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted

原创 Number of 1 Bits(二進制中1的個數)

Write a function that takes an unsigned integer and returns the number of ’1’ bits it has (also known as the Hammin

原创 Power of Two

Given an integer, write a function to determine if it is a power of two.(給定一個整數,判斷其是否是2的冪) 1.個人分析 與判斷是否是3的冪類似,普通解法

原创 Maximum Depth of Binary Tree(二叉樹的最大深度)

Given a binary tree, find its maximum depth.(找出給定二叉樹的最大深度) The maximum depth is the number of nodes along the long

原创 Power of Four

Given an integer (signed 32 bits), write a function to check whether it is a power of 4.(給定一個32位整型數,判斷其是否是4的冪) 1.個人

原创 Move Zeroes(移動零元素)

Given an array nums, write a function to move all 0’s to the end of it while maintaining the relative order of the

原创 Remove Duplicates from Sorted List(去除有序鏈表中的重複元素)

Given a sorted linked list, delete all duplicates such that each element appear only once.(給定一個有序鏈表,刪除所有的重複元素,使得所有元