摘要:
今天学习廖老师的python教程,碰到了修饰符'@',不太了解,查看了下官方文档。简单的整理下:@dec2@dec1def func(arg1, arg2, ...): pass 等价于def func(arg1, arg2, ...): passfunc = dec2(dec1(fun... 阅读全文
摘要:
Given two sorted integer arraysnums1andnums2, mergenums2intonums1as one sorted array.Note:You may assume thatnums1has enough space (size that is great... 阅读全文
摘要:
GivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]... 阅读全文
摘要:
作为安装程序的Setup文件是软件的开发者专门为其软件设计的.exe文件,是当前最为盛行的安装程序。在运行该Setup文件进行软件安装时,Setup除了进行复制、改名、解压和目录维护等基本安装工作外,还要对系统进行必要的配置,通常是修改config.sys、autoexec.bat和注册表等文件,以 阅读全文
摘要:
Compare two version numbersversion1andversion2.Ifversion1>version2return 1, ifversion10.01代码如下:class Solution { public: int compareVersion(strin... 阅读全文
摘要:
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Pana... 阅读全文
摘要:
Given an array of sizen, find the majority element. The majority element is the element that appears more than⌊ n/2 ⌋times.You may assume that the arr... 阅读全文
摘要:
Design a stack that supports push, pop, top, and retrieving(检索) the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Rem... 阅读全文
摘要:
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: a... 阅读全文
摘要:
Given an integern, return the number of trailing zeroes inn!.Note:Your solution should be in logarithmic time complexity.分析:题意即为 阶乘尾部的零(求n!中尾部为0的个数)思路... 阅读全文