MayUWell

Learn, Sleep, Learn

做了的事和计划做的一些事

书籍: <机器学习实战> 已看完,GitHub代码已完成(书中代码是python2,我的是python3)。强烈推荐此书 链接:https://github.com/hyc2017/MachineLearningInAction &amp...

2018-01-29 14:18:00

阅读数:678

评论数:32

LinkedList-141-Linked List Cycle

Description: Given a linked list, determine if it has a cycle in it. Solution: //定义两个指针,一个为slow,每次走一步,一个为fast,每次走两步,若slow与fast相等,则必有环 public cl...

2018-01-31 22:54:27

阅读数:51

评论数:0

LinkedList-83-Remove Duplicates from Sorted List

Description: Given a sorted linked list, delete all duplicates such that each element appear only once. For example, Given 1->1-&...

2018-01-31 22:49:06

阅读数:61

评论数:0

LinkedList-21-Merge Two Sorted Lists

Description: 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 ...

2018-01-31 22:38:27

阅读数:70

评论数:0

LinkedList-206-Reverse Linked List

Description: Reverse a singly linked list. Iterative Version: /** * Definition for singly-linked list. * public class ListNode { * int va...

2018-01-31 22:35:57

阅读数:63

评论数:0

LinkedList-237-Delete Node in a Linked List

Description: Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Supposed the linked list...

2018-01-31 22:27:42

阅读数:70

评论数:0

Math-8-String to Integer (atoi)

Description: Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please d...

2018-01-31 22:19:01

阅读数:72

评论数:0

Math-29-Divide Two Integers

Description: Divide two integers without using multiplication, division and mod operator. If it is overflow, return MAX_INT. Solution: 举例来说,6...

2018-01-31 22:09:20

阅读数:62

评论数:0

Math-523-Continuous Subarray Sum

Description: Given a list of non-negative numbers and a target integer k, write a function to check if the array has a continuous subarray of size a...

2018-01-31 21:38:51

阅读数:76

评论数:0

Math-754. Reach a Number

Description: You are standing at position 0 on an infinite number line. There is a goal at position target. On each move, you can either go left o...

2018-01-31 21:05:45

阅读数:68

评论数:0

Math-50-Pow(x, n)

Description: Implement pow(x, n). Example 1: Input: 2.00000, 10 Output: 1024.00000 Example 2: Input: 2.10000, 3 Output: 9.26100 Best Solu...

2018-01-31 20:45:15

阅读数:67

评论数:0

Math-43-Multiply Strings

Description: Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2. Note: The length of both n...

2018-01-30 21:06:00

阅读数:60

评论数:0

Math-365-Water and Jug Problem

Description: You are given two jugs with capacities x and y litres. There is an infinite amount of water supply available. You need to determine whe...

2018-01-30 20:55:23

阅读数:62

评论数:0

Math-2-Add Two Numbers

Description: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of the...

2018-01-30 20:31:02

阅读数:60

评论数:0

Math-60-Permutation Sequence

Description: The set [1,2,3,…,n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order, We get the ...

2018-01-30 20:23:46

阅读数:73

评论数:0

Math-397-Integer Replacement

Description: Given a positive integer n and you can do operations as follow: If n is even, replace n with n/2. If n is odd, you can replace n with...

2018-01-30 19:57:51

阅读数:127

评论数:0

Math-264-Ugly Number II

Description: Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example...

2018-01-30 19:41:19

阅读数:65

评论数:0

Math-223-Rectangle Area

Description: Find the total area covered by two rectilinear rectangles in a 2D plane. Each rectangle is defined by its bottom left corner and top r...

2018-01-30 19:31:11

阅读数:63

评论数:0

Math-396-Rotate Function

Description: Given an array of integers A and let n to be its length. Assume Bk to be an array obtained by rotating the array A k positions clock-...

2018-01-30 19:24:24

阅读数:61

评论数:0

Math-368-Largest Divisible Subset

Description: Given a set of distinct positive integers, find the largest subset such that every pair (Si, Sj) of elements in this subset satisfies:...

2018-01-30 19:10:24

阅读数:74

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭