原创 LeetCode Count Primes
Description:Count the number of prime numbers less than a non-negative number, n.思路分析:這題是一道數學題,求小於n的所有質數。容易想到的思路是定義個isP
原创 LeetCode Happy Number
Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Sta
原创 LeetCode Number of 1 Bits
Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming we
原创 LeetCode Kth Smallest Element in a BST
Given a binary search tree, write a function kthSmallest to find the kth smallest element in it.Note: You may assume k
原创 LeetCode Reverse Bits
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 0000001010
原创 LeetCode Missing Ranges [LeetCode Book Problem]
Given a sorted integer array where the range of elements are [lower, upper] inclusive, return its missing ranges.For ex
原创 LeetCode Majority Element II
Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. The algorithm should run in li
原创 LeetCode Invert Binary Tree
Invert a binary tree. 4 / \ 2 7 / \ / \ 1 3 6 9to 4 / \ 7 2 / \ / \ 9 6 3 1
原创 LeetCode Product of Array Except Self
Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of a
原创 LeetCode Implement Queue using Stacks
Implement the following operations of a queue using stacks.push(x) -- Push element x to the back of queue.pop() -- Remo
原创 LeetCode Find Minimum in Rotated Sorted Array
Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1
原创 LeetCode Copy List with Random Pointer
A linked list is given such that each node contains an additional random pointer which could point to any node in the l
原创 LeetCode Maximal Square
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.For ex
原创 論文發表-關於深度學習在問答系統和對話系統方面的應用研究-2018到2019年
作者導言:以下是我2018-2019年發表的關於深度學習在問答系統和對話系統的應用的paper,感興趣的讀者可以查閱。大家如果有關於這些paper的問題,歡迎發郵件到我的email ([email protected])諮詢討論,我會
原创 概率語言模型及其變形系列(1)-PLSA及EM算法
本系列博文介紹常見概率語言模型及其變形模型,主要總結PLSA、LDA及LDA的變形模型及參數Inference方法。初步計劃內容如下第一篇:PLSA及EM算法第二篇:LDA及Gibbs Samping第三篇:LDA變形模型-Twitter