随笔分类 - 算法
c\c++、数据结构、算法导论理论及实现应用
摘要:因项目上需要用到特征提取算法,突然想起早些时候看吴军的数学之美里有讲到SVD分解,当时就大致浏览了下,今天在这里用图像作为例子加深下印象,显示下svd特征提取、降维效果。 奇异值分解(Singular Value Decomposition)定理:设A为m*n阶复矩阵,则存在m阶酉阵U和n阶酉阵V,
阅读全文
摘要:Reverse Words in a String 单词取反 whowhoha@outlook.com Question: Given an input string s, reverse the string word by word. For example, given s = "the sk
阅读全文
摘要:Implement strstr() 实现strstr函数功能 whowhoha@outlook.com Question: Implement strstr(). Returns the index of the first occurrence of needle in haystack, or
阅读全文
摘要:Valid Palindrome回文数 whowhoha@outlook.com Question: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignor
阅读全文
摘要:Two Sum II – Input array is sorted whowhoha@outlook.com Question: Similar to Question [1. Two Sum], except that the input array is already sorted in a
阅读全文
摘要:Question: Design and implement a TwoSum class. It should support the following operations: add and find. add(input) – Add the number input to an inter
阅读全文
摘要:leetcode 练习1 two sum whowhoha@outlook.com 问题描述 Given an array of integers, return indices of the two numbers such that they add up to a specific targe
阅读全文
摘要:Ch2算法基础 whowhoha@outlook.com 2.1 插入排序 输入:n个数的一个序列〈a1,a2,…,an〉。 输出:输入序列的一个排列〈a′1,a′2,…,a′n〉,满足a′1≤a′2≤…≤a′n。 我们希望排序的数也称为关键词。插入排序,插入排序的工作方式像许多人排序一手扑克牌。开
阅读全文

浙公网安备 33010602011771号