苹果系统修复若干办法

在经典系统,可以在重新启动时按Shift键,将第三方的功能扩展关闭,使机子能完成启动,之后再设法修复磁盘错误或功能扩展冲突的问题。重新启动,当所有功能扩展的上载完成后,立即按下Option+Command键,直到出现重建桌面文件的窗口,点击OK,可以重建桌面文件,修复因桌面文件出错引起的问题。即使是正常运行的系统,至少每月重建桌面一次,对系统健康有益无害。  在X系统,重启后立即按Shift键,让...
阅读(639) 评论(0)

【LeetCode从零单排】No 3 Longest Substring Without Repeating Characters

题目Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. Fo...
阅读(980) 评论(0)

【LeetCode从零单排】No 114 Flatten Binary Tree to Linked List

题目Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6 The flattened tree should look like: 1 \ 2 ...
阅读(957) 评论(0)

【LeetCode从零单排】No 191.Number of 1 Bits(考察位运算)

题目Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight).For example, the 32-bit integer ’11' has binary representation 0000000000...
阅读(3993) 评论(2)

Kmeans、Kmeans++和KNN算法比较

K-Means介绍       K-means算法是聚类分析中使用最广泛的算法之一。它把n个对象根据他们的属性分为k个聚类以便使得所获得的聚类满足:同一聚类中的对象相似度较高;而不同聚类中的对象相似度较小。其聚类过程可以用下图表示:        如图所示,数据样本用圆点表示,每个簇的中心点用叉叉表示。(a)刚开始时是原始数据,杂乱无章,没有label,看起来都一样,都是绿色的。(b)假设数据集可...
阅读(909) 评论(0)

【LeetCode从零单排】No189 .Rotate Array

题目Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4].Note:Try to come up as many solutions as you can, the...
阅读(1077) 评论(0)

【LeetCode从零单排】No.169 Majority Element(hashmap用法)

题目Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and the majority element alwa...
阅读(1030) 评论(0)

【LeetCode从零单排】No.160 Intersection of Two Linked Lists

题目Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:A: a1 → a2 ↘ ...
阅读(821) 评论(0)

【LeetCode从零单排】No118 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] ]代码public class Solution { public...
阅读(1072) 评论(0)

linux||mac os如何自定义shell命令

博主是goagent忠实用户,但是在mac下每次启动goagent都要cd到proxy的目录下,然后再执行proxy.py文件,非常麻烦,所以博主想到能否自己定义一个shell命令,一健启动goagent,其实也很简单,过程如下。(1)我们在user目录下输入,"-a"是现实隐藏的文件ls -a(2)展现出了很多前边是"."的文件,这种文件在通常情况下是隐藏的hirotekiMacBook-Pro...
阅读(1947) 评论(0)

【LeetCode从零单排】No112 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 = ...
阅读(1063) 评论(0)

【LeetCode从零单排】No104 Maximum Depth of Binary Tree

题目Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.代码/** * Definition for binary tree * p...
阅读(1045) 评论(0)

【LeetCode从零单排】No102 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 20 /...
阅读(1103) 评论(2)

【LeetCode从零单排】No100 Same Tree && No101 Symmetric Tree

题目1.same treeGiven 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.2.sym...
阅读(1016) 评论(0)

【LeetCode从零单排】No83 Remove Duplicates from Sorted List

题目Given a sorted linked list, delete all duplicates such that each element appear only once.For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, return 1->2->3.代码 public static ListNode deleteD...
阅读(964) 评论(0)

【LeetCode从零单排】No88.Merge Sorted Array

题目Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that is greater or equal to m + n) to hold additional elements from B. T...
阅读(930) 评论(0)

【LeetCode从零单排】No70.ClimbingStairs

题目          爬楼梯问题,这是一道很有趣的问题。首先看题目:You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?这...
阅读(1489) 评论(0)

【LeetCode从零单排】No67.AddBinary

题目Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".代码public class Solution { public String addBinary(String a, String b) { S...
阅读(871) 评论(0)

【LeetCode从零单排】No58.Length of Last Word

题目Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word does not exist, return 0.Note: A word is defined...
阅读(973) 评论(0)

【LeetCode从零单排】No38.CountAndSay

题目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" or 11.11 is read off as "two 1s" or 21.21 is read off as "one 2, then...
阅读(928) 评论(0)
260条 共13页首页 上一页 1 2 3 4 5 ... 下一页 尾页
    我的微信公众号

    作者公众号:凡人机器学习

    凡人机器学习

    作者新书《机器学习实践应用》

    主要讲述算法和业务的结合,适合初学者

    机器学习实践应用

    京东地址

    个人资料
    • 访问:693876次
    • 积分:9691
    • 等级:
    • 排名:第1897名
    • 原创:220篇
    • 转载:39篇
    • 译文:0篇
    • 评论:433条
    博客专栏
    统计