自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 收藏
  • 关注

原创 【聚类算法】挖坑之作

这学期选了聚类算法的课,所以先挖个坑,把每周所学都来整理一下。一方面作为自己的笔记,另一方面也可以让自己课后再折腾一下。按照老师上课的说法,本学期的topics大概如下,所以这学期关于聚类算法的整理也就按照课程的进度进行吧。1. K-means2. Hierarchical methods3. Peak- climbing methods (密度)4. Grap

2016-02-18 11:32:31 524

原创 Webview && 浏览器

Q:使用了webview控件却发现在真机测试的时候,手机调用了手机的浏览器打开链接。A:web 是自己定义的webView控件web.setWebViewClient(new WebViewClient()    {      @Override      public boolean shouldOverri

2015-04-27 20:43:00 260

转载 Android 字体

1)将新字体的TTF文件copy到assets/fonts/目录下面,例如我们将“*.ttf”copy了过去。2)需要编写源代码。  TextView tv = (TextView)findViewById(R.id.c12_custom);  //从assert中获取有资源,获得app的assert,采用getAserts(),通过给出在assert/下面的相对路径。在实际使用中

2015-03-23 20:04:55 255

转载 Android中全屏或者取消标题栏

Android中全屏或者取消标题栏先介绍去掉标题栏的方法:第一种:也一般入门的时候经常使用的一种方法requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉标题栏注意这句一定要写在setContentView()方法的前面,不然会报错的第二种:在AndroidManifest.xml文件中定义appli

2014-10-22 14:01:47 245

原创 Tree traversal

Pre-order[edit]Visit the root.Traverse the left subtree.Traverse the right subtree.In-order (symmetric)[edit]Traverse the left subtree.Visit the root.Traverse the right subtree.Post-or

2014-10-02 15:44:45 267

原创 【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 and sum

2014-10-01 01:31:12 228

原创 【LeetCode】Add Two Numbers

You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link

2014-09-30 20:35:17 256

原创 【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 target, whe

2014-09-30 15:44:49 209

原创 【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-09-30 14:58:18 215

原创 【LeetCode】Single Number II

Given an array of integers, every element appears three times except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without using

2014-09-30 14:30:55 274

原创 【LeetCode】Single Number

Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without using extra

2014-09-30 12:32:07 222

原创 【LeetCode】Max Points on a Line

Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.1.要注意斜率不存在的情况2.要注意点重复的时候的情况3.要注意int跟float的区别,最后的斜率是float类型的,但点坐标是int类型的,在计算斜率

2014-09-30 10:20:20 222

原创 【LeetCode】Sort List

Sort List Total Accepted: 22650 Total Submissions: 110501My SubmissionsSort a linked list in O(n log n) time using constant space complexity.Thanks for your feedback

2014-09-29 23:47:56 227

原创 【LeetCode】Evaluate Reverse Polish Notation

Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or another expression.Some examples: ["2", "1",

2014-09-26 16:25:30 273

原创 【LeetCode】Reverse Words in a String

Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".click to show clarification.Clarification:What constitutes

2014-09-26 13:04:59 236

原创 【LeetCode】Maximum Product Subarray

Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2,3,-2,4],the contiguous subarray [2,3] has the largest

2014-09-26 10:46:06 266

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

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