Elmagnifico's Blog

云深不知归处

LeetCode Solution(Easy.33-36)

c/c++,python,for work

33.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,#...

LeetCode Solution(Easy.29-32)

c/c++,python,for work

29.Plus One Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit is at the head of the list. 29.Plus ...

LeetCode Solution(Easy.25-28)

c/c++,python,for work

25.Remove Element Given an array and a value, remove all instances of that value in place and return the new length. The order of elements can be changed. It doesn’t matter what you leave beyond ...

LeetCode Solution(Easy.21-24)

c/c++,python,for work

21.Climbing Stairs 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? 21.Climbi...

LeetCode Solution(Easy.17-20)

c/c++,python,for work

17.Ugly Number Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 6, 8 are ugly while 14 i...

LeetCode Solution(Easy.13-16)

c/c++,python,for work

13.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 r...

LeetCode Solution(Easy.9-12)

c/c++,python,for work

9.Contains Duplicate Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return ...

LeetCode Solution(Easy.5-8)

c/c++,python,for work

5.Move Zeroes Given an array nums, write a function to move all 0’s to the end of it while maintaining the relative order of the non-zero elements. For example, given nums = [0, 1, 0, 3, 12], aft...

Shadowsocks与git的代理设置

proxy,SocksCap64,pac

代理、翻墙 前言 回到家了,突然发现csdn的blog、github、百度云盘(移动端能打开)都被封掉了 新疆真是个蛋疼的地方啊,没办法只好用代理了 goagent、GEA 最初翻墙用的是自由门,不过据说自由门不是很安全,而且还传递各种反动内容 后来发现了goagent其实也就是GEA,只用登陆注册好之后,在本地更新一下,填好自己的appid,浏览器设置好,就能翻墙 看标清视频...

树莓派启动那些事(六)

linux启动,systemd,unit,target

环境 system:2015-09-24-raspbian-jessie RaspberryPi:Raspberry Pi 2 树莓派启动的相关问题 树莓派启动的相关问题,会从config.txt一直介绍到linux如何启动,启动流程分析,自启动脚本实现。 linux的启动分析 linux内核启动 systemd Systemd的主要目的就是减少系统引导时间和计算开销。Sys...