This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Ref http://zeromq.org/intro:get-the-software | |
wget https://github.com/zeromq/libzmq/releases/download/v4.2.3/zeromq-4.2.3.tar.gz | |
# Unpack | |
tar xvzf zeromq-4.2.3.tar.gz | |
# Install dependencies | |
sudo apt-get update && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Solution(object): | |
def fizzBuzz(self, n): | |
""" | |
:type n: int | |
:rtype: List[str] | |
""" | |
l = [] | |
for i in range(1, n + 1): | |
if i % 3 == 0 and i % 5 == 0: | |
l.append("FizzBuzz") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Solution(object): | |
def firstMissingPositive(self, nums): | |
""" | |
:type nums: List[int] | |
:rtype: int | |
""" | |
max_num = len(nums) +1 | |
nums_set = set(nums) | |
for i in range(1, max_num): | |
if i not in nums_set: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
book IsPalindrome(const char *s,int n) | |
{ | |
//非法输入 | |
if(s == NULL || n < 1) | |
{ | |
return false; | |
} | |
const char* front,*back; | |
//初始化头指针和尾指针 |