Applenice

有核有肉有梦想

Algorithms

本周算法题:
Remove Duplicates from Sorted Array

思路:快慢指针遍历数组,如果两个指针指的数字相同,快指针向前+1,如果不同,快慢指针同时向前+1。快指针遍历数组完毕,慢指针+1就是数组中不同数组的个数。

阅读全文 »

Algorithms

本周算法题:
Valid Parentheses
思路:遍历字符串,使用栈,当字符为左半边括号时,压入栈中,遇到右半边括号,取出栈顶元素,如果能匹配上,就继续。

阅读全文 »

Algorithms

本周leetcode Palindrome Number
思路:先排除负数、末位为0的数字。剩下的考虑使用数字翻转就可以了。

阅读全文 »

Algorithms

本周leetcode:Reverse Integer
int型数值范围: -2147483648~2147483647,最开始时并没考虑溢出问题,导致在Submit直接报错,原数转置以后可能会出现溢出的情况。

阅读全文 »

Algorithms

第一周算法题:leetcode01

1
2
3
4
5
6
7
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.

Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9,
return [0, 1].
阅读全文 »

  之前阅读了李华峰的《Nmap网络安全审计技术揭秘》,主要学习了一下常用的命令,nse脚本.现在整一下笔记.

阅读全文 »

  我自己经常逛B站,发现很多小伙伴好像住在B站一样,就研究了一下怎么用Python获取B站UP们的一些信息.比如注册时间,生日,有多少粉丝等,说明一下,本文只说分析过程,代码地址见文章底部.

阅读全文 »
0%