摘要: 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 at least 2 that 阅读全文
posted @ 2016-07-01 04:55 北叶青藤 阅读(163) 评论(0) 推荐(0)
摘要: Cosine similarity is a measure of similarity between two vectors of an inner product space that measures the cosine of the angle between them. The cos 阅读全文
posted @ 2016-07-01 03:11 北叶青藤 阅读(532) 评论(0) 推荐(0)
摘要: Flatten a binary tree to a fake "linked list" in pre-order traversal. Here we use the right pointer in TreeNode as the next pointer in ListNode. For e 阅读全文
posted @ 2016-07-01 02:31 北叶青藤 阅读(275) 评论(0) 推荐(0)
摘要: Intersection of Two Arrays Given two arrays, write a function to compute their intersection. Example Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], retur 阅读全文
posted @ 2016-06-30 12:50 北叶青藤 阅读(222) 评论(0) 推荐(0)
摘要: Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the hist 阅读全文
posted @ 2016-06-30 12:11 北叶青藤 阅读(284) 评论(0) 推荐(0)
摘要: Given an array with positive and negative integers. Re-range it to interleaving with positive and negative integers. Note: You are not necessary to ke 阅读全文
posted @ 2016-06-30 05:12 北叶青藤 阅读(305) 评论(0) 推荐(0)
摘要: Majority Number Given an array of integers, the majority number is the number that occurs more than half of the size of the array. Find it. Example Gi 阅读全文
posted @ 2016-06-29 22:58 北叶青藤 阅读(396) 评论(0) 推荐(0)
摘要: Given an integer array, adjust each integers so that the difference of every adjacent integers are not greater than a given number target. If the arra 阅读全文
posted @ 2016-06-29 10:57 北叶青藤 阅读(523) 评论(0) 推荐(0)
摘要: Word Search I Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell 阅读全文
posted @ 2016-06-29 03:13 北叶青藤 阅读(315) 评论(0) 推荐(0)
摘要: 本文介绍如何在MVC里往数据库中插入新的记录。这里用到的数据表如下:EmployeesStep 1:在Control文件里加入method public ActionResult Create() { return View(); }S... 阅读全文
posted @ 2015-02-01 05:35 北叶青藤 阅读(196) 评论(0) 推荐(0)