摘要:
An important task when processing arithmetic expressions is to mach delimiters. We can use Stack to solve this problem. 阅读全文
2018年9月17日
摘要:
We can realize a Stack as an adaptation of a Python List. S.push(e)=L.append(e) S.pop()=L.pop() S.top()=L[-1] S.len()=len(L) S.is_empty=(len(L)==0) 阅读全文
2018年9月16日
摘要:
Given an array A of non-negative integers, return an array consisting of all the even elements of A, followed by all the odd elements of A. You may re 阅读全文
2018年9月15日
摘要:
You're given strings J representing the types of stones that are jewels, and S representing the stones you have. Each character in Sis a type of stone 阅读全文
摘要:
def good_fibonacci(n): if n<=1: return (n,0) else: (a,b)=good_fibonacci(n-1) return (a+b,a) 阅读全文
2018年8月24日
摘要:
Problem Description: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that eac 阅读全文