當然
求1+2+3+...+n時間限制:1秒 空間限制:32768K 題目描述 求1+2+3+...+n,要求不能使用乘除法、for、while、if、else、switch、case等關(guān)鍵字及條件判斷語...
當然
求1+2+3+...+n時間限制:1秒 空間限制:32768K 題目描述 求1+2+3+...+n,要求不能使用乘除法、for、while、if、else、switch、case等關(guān)鍵字及條件判斷語...
問題描述 給你一個長度為的01串,定義“答案”=該串中最長的連續(xù)1的長度?,F(xiàn)有K次機會將其中的某個0改為1,現(xiàn)在求最大可能“答案”。 解題思路 遍歷這個數(shù),將為0的位置pus...
問題描述 一張包含個節(jié)點、條邊的無向連通圖,其中,節(jié)點從1到進行編號,每條邊的長度均為1。假設(shè)從1號節(jié)點出發(fā)并打算遍歷圖中所有節(jié)點,那么所需要的總路程至少是多少? 解題思路 ...
問題描述 將一組非負整數(shù)組成的數(shù)組作為柱狀圖中每個柱子的高度值,且每個柱子寬度為1。找出這個柱狀圖中所包含矩形的最大面積。 解題思路 使用分治法,最大矩形面積只可能有三種情況...
問題描述 100元換零錢1元、2元、5元、10元、20元、50元有多少種組合方案? 解題思路 使用動態(tài)規(guī)劃來求解,使用表示用不超過第個面值(從小到大排序)的零錢來表示的所有組...
時間限制:1秒 空間限制:32768K 題目描述 There are N children standing in a line. Each child is assigne...
2.1 概率論基礎(chǔ) 全概率公式 貝葉斯法則(Bayes' theorem) 貝葉斯決策理論(Bayesian decision theory) 2.2 信息論基礎(chǔ) 熵(ent...
1.1 基本概念 自然語言指人類使用的語言,如漢語、英語等。 語言的兩個基本屬性:文字和聲音。 自然語言處理 或稱自然語言理解(Natural Language Unders...
時間限制:1秒 空間限制:32768K 題目描述 Given an array of integers, every element appears twice except...
時間限制:1秒 空間限制:32768K 題目描述 Given an array of integers, every element appears three times ...
時間限制:1秒 空間限制:32768K 題目描述 A linked list is given such that each node contains an additio...
時間限制:1秒 空間限制:32768K 題目描述 Given a string s and a dictionary of words dict, determine if ...
時間限制:1秒 空間限制:32768K 題目描述 Given a string s and a dictionary of words dict, add spaces in...
時間限制:1秒 空間限制:32768K 題目描述 Given a linked list, determine if it has a cycle in it.Follow ...
時間限制:1秒 空間限制:32768K 題目描述 Given a linked list, return the node where the cycle begins. I...
時間限制:1秒 空間限制:32768K 題目描述 Given a singly linked list L: L 0→L 1→…→L n-1→L n,reorder it t...
一、HMM建模 HMM參數(shù): 二、HMM的3個假設(shè) (一)馬爾科夫假設(shè) (二)觀測獨立性假設(shè) (三)不變性假設(shè) 轉(zhuǎn)移矩陣不隨時間變化。 三、HMM的3個問題 (一)概率計算/...
時間限制:1秒 空間限制:32768K 題目描述 Given a binary tree, return the preorder traversal of its node...
時間限制:1秒 空間限制:32768K 題目描述 Given a binary tree, return the postorder traversal of its nod...
一、單成分單變量高斯模型 二、單成分多變量高斯模型 若協(xié)方差矩陣為對角矩陣且對角線上值相等,兩變量高斯分布的等值線為圓形。 若協(xié)方差矩陣為對角矩陣且對角線上值不等,兩變量高斯...