上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 26 下一页
摘要: 所谓回文字符串,就是一个字符串,从左到右读和从右到左读是完全一样的。比如"level" 、 “aaabbaaa” 递归 非递归 C++ bool isPalindrome(string s, int start, int end) { while (start 阅读全文
posted @ 2017-06-26 15:06 清水汪汪 阅读(457) 评论(0) 推荐(0) 编辑
摘要: Question There are N gas stations along a circular route, where the amount of gas at station i isgas[i]. You have a car with an unlimited gas tank and 阅读全文
posted @ 2017-06-26 13:57 清水汪汪 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 交叉熵代价函数(Cross entropy cost function)是用来衡量人工神经网络(ANN)的预测值与实际值的一种方式。与二次代价函数相比,它能更有效地促进ANN的训练。在介绍交叉熵代价函数之前,本文先简要介绍二次代价函数,以及其存在的不足。 1. 二次代价函数的不足 ANN的设计目的之 阅读全文
posted @ 2017-06-26 10:42 清水汪汪 阅读(484) 评论(0) 推荐(0) 编辑
摘要: 1、均方根值(RMS)也称作为效值,它的计算方法是先平方、再平均、然后开方。 2、均方根误差,它是观测值与真值偏差的平方和观测次数n比值的平方根,在实际测量中,观测次数n总是有限的,真值只能用最可信赖(最佳)值来代替.方根误差对一组测量中的特大或特小误差反映非常敏感,所以,均方根误差能够很好地反映出 阅读全文
posted @ 2017-06-26 10:29 清水汪汪 阅读(54430) 评论(2) 推荐(2) 编辑
摘要: Question Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? Solution 判断一个链表是否有环,可以采用slow f 阅读全文
posted @ 2017-06-25 16:10 清水汪汪 阅读(152) 评论(0) 推荐(0) 编辑
摘要: Question Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Follow up: Can you solve it without using ext 阅读全文
posted @ 2017-06-25 15:59 清水汪汪 阅读(156) 评论(0) 推荐(0) 编辑
摘要: LeetCode——Insertion Sort List Question Sort a linked list using insertion sort. Solution 我的解法,假设第一个节点都比其他节点小,这样感觉好移动指针一些,所以添加了一个额外的最小的节点。 Code 阅读全文
posted @ 2017-06-25 14:32 清水汪汪 阅读(108) 评论(0) 推荐(0) 编辑
摘要: LeetCode— Sort List Question Sort a linked list in O(n log n) time using constant space complexity. Solution 看到对链表的排序,时间复杂度O(n log n),首先想到的就是归并排序。 但是这 阅读全文
posted @ 2017-06-25 12:29 清水汪汪 阅读(151) 评论(0) 推荐(0) 编辑
摘要: LeetCode——Longest Consecutive Sequence Question Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For 阅读全文
posted @ 2017-06-07 23:59 清水汪汪 阅读(140) 评论(0) 推荐(0) 编辑
摘要: LeetCode——single number系列 Question 1 Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorith 阅读全文
posted @ 2017-06-07 21:53 清水汪汪 阅读(106) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 26 下一页