![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
文章平均质量分 74
追梦船
机器学习,自然语言处理方向的小菜鸟
展开
-
常见面试之机器学习算法思想简单梳理
前言: 找工作时(IT行业),除了常见的软件开发以外,机器学习岗位也可以当作是一个选择,不少计算机方向的研究生都会接触这个,如果你的研究方向是机器学习/数据挖掘之类,且又对其非常感兴趣的话,可以考虑考虑该岗位,毕竟在机器智能没达到人类水平之前,机器学习可以作为一种重要手段,而随着科技的不断发展,相信这方面的人才需求也会越来越大。 纵观IT行业的招聘岗位,机器学习之类的岗位还是挺转载 2014-09-16 14:09:00 · 803 阅读 · 0 评论 -
[leetcode]Unique Paths II
问题描述:Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space is marked as 1 and0 respectively in原创 2014-11-07 19:02:46 · 650 阅读 · 0 评论 -
并查集(Union-find)算法介绍
本文主要介绍解决动态连通性一类问题的一种算法,使用到了一种叫做并查集的数据结构,称为Union-Find。更多的信息可以参考Algorithms 一书的Section 1.5,实际上本文也就是基于它的一篇读后感吧。原文中更多的是给出一些结论,我尝试给出一些思路上的过程,即为什么要使用这个方法,而不是别的什么方法。我觉得这个可能更加有意义一些,相比于记下一些结论。转载 2014-10-22 10:33:07 · 700 阅读 · 0 评论 -
[leetcode]Valid Palindrome
问题描述:Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Panama" is a palindrome."race a car" is原创 2014-10-25 21:10:34 · 736 阅读 · 0 评论 -
[leetcode]Pascal's Triangle
问题描述:Given numRows, generate the first numRows of Pascal's triangle.For example, given numRows = 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]]import java.util.Arr原创 2014-10-25 21:24:15 · 665 阅读 · 0 评论 -
[leetcode]Pascal's Triangle II
问题描述:Given an index k, return the kth row of the Pascal's triangle.For example, given k = 3,Return [1,3,3,1].Note:Could you optimize your algorithm to use only O(k) extra space?思路:原创 2014-10-26 11:24:43 · 776 阅读 · 0 评论 -
[leetcode]Minimum Depth of Binary Tree
问题描述:Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.代码:public class原创 2014-10-26 14:43:37 · 763 阅读 · 0 评论 -
[leetcode]Two Sum
问题描述:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the targ原创 2014-11-11 19:58:19 · 662 阅读 · 0 评论 -
[leetcode] Path Sum
问题描述:Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.For example:Given the below binary tree原创 2014-10-26 11:51:35 · 804 阅读 · 0 评论 -
[leetcode]Path Sum II
问题描述:Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree and sum = 22, 5 /原创 2014-10-26 14:18:54 · 649 阅读 · 0 评论 -
[leetcode]Triangle
问题描述:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the following triangle[ [2], [3,4原创 2014-11-11 21:04:15 · 732 阅读 · 0 评论 -
[leetcode]Spiral Matrix
问题描述:Given a matrix of m x n elements (m rows,n columns), return all elements of the matrix in spiral order.For example,Given the following matrix:[ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9原创 2014-11-12 13:20:22 · 973 阅读 · 0 评论 -
[leetcode]Subsets
问题描述:Given a set of distinct integers, S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not contain duplicate subsets.For ex原创 2014-11-12 11:25:05 · 800 阅读 · 0 评论 -
[leetcode]Climbing Stairs
问题描述:代码:原创 2014-10-27 21:43:35 · 424 阅读 · 0 评论 -
[leetcode]Sort Colors
问题描述:Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.Here, we will use the in原创 2014-11-12 16:26:31 · 703 阅读 · 0 评论 -
[leetcode]Set Matrix Zeroes
问题描述:基本思路:代码:void setZeroes(vector > &matrix) { set rows; set cols; int m = matrix.size(); if(m == 0) return ; int n = matr原创 2014-11-12 21:06:37 · 606 阅读 · 0 评论 -
[leetcode]Balanced Binary Tree
问题描述:Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees ofevery node nev原创 2014-10-27 19:34:38 · 769 阅读 · 0 评论 -
[leetcode]Symmetric Tree
问题描述:Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ 2 2 / \ / \3 4 4 3But the原创 2014-10-27 20:37:07 · 685 阅读 · 0 评论 -
[leetcode]Subsets II
问题描述:Given a collection of integers that might contain duplicates,S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not conta原创 2014-11-12 11:48:25 · 659 阅读 · 0 评论 -
[leetcode]Same Tree
问题描述:Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same value.原创 2014-10-27 20:57:50 · 669 阅读 · 0 评论 -
[leetcode]Remove Duplicates from Sorted List
问题描述:代码:public class Remove_Duplicates_from_Sorted_List { //java public class ListNode { int val; ListNode next; ListNode(int x) { val = x;原创 2014-10-27 21:29:45 · 466 阅读 · 0 评论 -
[leetcode]Spiral Matrix II
问题描述:Given an integer n, generate a square matrix filled with elements from 1 ton2 in spiral order.For example,Given n = 3,You should return the following matrix:[ [ 1, 2, 3 ], [ 8, 9,原创 2014-11-12 14:12:46 · 753 阅读 · 0 评论 -
[leetcode]Search Insert Position
问题描述:基本思路:原创 2014-11-12 21:26:46 · 446 阅读 · 0 评论 -
[leetcode]Binary Tree Level Order Traversal
问题描述:Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree {3,9,20,#,#,15,7}, 3 / \ 9原创 2014-10-27 20:18:09 · 686 阅读 · 0 评论 -
[leetcode]Merge Sorted Array
问题描述:原创 2014-10-27 21:19:11 · 467 阅读 · 0 评论 -
[leetcode]Binary Tree Level Order Traversal II
问题描述:Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For example:Given binary tree {3,9,20,#,#,原创 2014-10-27 20:04:48 · 752 阅读 · 0 评论 -
[leetcode]Maximum Depth of Binary Tree
问题描述:代码:原创 2014-10-27 20:13:03 · 399 阅读 · 0 评论 -
[leetcode]Container With Most Water
问题描述:Given n non-negative integers a1,a2, ..., an, where each represents a point at coordinate (i,ai). n vertical lines are drawn such that the two endpoints of linei is at (i, ai) and (i, 0原创 2014-11-13 22:02:30 · 706 阅读 · 0 评论 -
[leetcode]Add Binary
问题描述:Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".代码:public class AddBinary { //java public String addBinary(St原创 2014-10-28 19:12:18 · 663 阅读 · 0 评论 -
[leetcode]Length of Last Word
问题描述:代码:原创 2014-10-28 19:50:56 · 501 阅读 · 0 评论 -
[leetcode]Valid Number
问题描述:Validate if a given string is numeric.Some examples:"0" => true" 0.1 " => true"abc" => false"1 a" => false"2e10" => trueNote: It is intended for the problem statement to be am原创 2014-10-28 18:41:23 · 649 阅读 · 0 评论 -
[leetcode]Plus One
问题描述:Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at the head of the list.代码:原创 2014-10-28 17:25:36 · 652 阅读 · 0 评论 -
[leetcode]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 nodes of the first two lists.代码:import java.util.List;public class Merge原创 2014-10-28 19:37:30 · 607 阅读 · 0 评论 -
[leetcode]Count and Say
问题描述:The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1 is read off as "one 1" or11.11 is read off as "two 1s" or 21.21 is read off原创 2014-10-28 20:25:01 · 684 阅读 · 0 评论 -
[leetcode]3 Sum closest
问题描述:Given an array S of n integers, find three integers inS such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would ha原创 2014-11-16 10:27:35 · 1119 阅读 · 0 评论 -
[leetcode]Remove Element
问题描述:Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't matter what you leave beyond the new lengt原创 2014-10-30 19:31:08 · 803 阅读 · 0 评论 -
[leetcode]3Sum
问题描述:Given an array S of n integers, are there elementsa, b, c in S such that a + b +c = 0? Find all unique triplets in the array which gives the sum of zero.Note:Elements in a triplet原创 2014-11-15 22:01:00 · 972 阅读 · 0 评论 -
[leetcode]Valid Sudoku
问题描述:Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with the character'.'.A partially原创 2014-10-30 08:45:39 · 947 阅读 · 0 评论 -
[leetcode]Remove Duplicates from Sorted Array
问题描述:代码:原创 2014-10-30 19:43:31 · 522 阅读 · 0 评论 -
[leetcode]Remove Nth Node From End of List
问题描述:代码:原创 2014-10-30 20:07:17 · 467 阅读 · 0 评论