posted @ 2018-04-06 17:57 wangziyan 阅读(136) 评论(0) 推荐(0)
摘要:
题目: Given a 32-bit signed integer, reverse digits of an integer. Example 1: Example 2: Example 3: Note:Assume we are dealing with an environment which 阅读全文
摘要:
6.ZigZag Conversion 题目: The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this 阅读全文
posted @ 2018-04-06 17:17 wangziyan 阅读(184) 评论(0) 推荐(0)
摘要:
题目: Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example: Example: 从对题目的理解来看,其实 阅读全文
posted @ 2018-04-06 15:11 wangziyan 阅读(138) 评论(0) 推荐(0)
摘要:
题目: Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adj 阅读全文
posted @ 2018-03-29 20:03 wangziyan 阅读(383) 评论(0) 推荐(0)
摘要:
题目: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the 阅读全文
posted @ 2018-03-29 13:50 wangziyan 阅读(164) 评论(0) 推荐(1)
摘要:
题目: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes co 阅读全文
posted @ 2018-03-29 09:17 wangziyan 阅读(229) 评论(0) 推荐(0)
摘要:
1. Two Sum 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 wo 阅读全文
posted @ 2018-03-28 21:30 wangziyan 阅读(184) 评论(0) 推荐(0)
摘要:
首先先放上蟒蛇的绘制程序 import turtle#引入外部库#def保留字用于 定义函数 阅读全文
posted @ 2018-02-19 15:27 wangziyan 阅读(1841) 评论(0) 推荐(0)
摘要:
程序元素: 注释,缩进,变量,常量,表达式 输入,输出,分支,循环 示例程序,温度转换程序: 缩进 一个缩进=四个空格 用以在Python中标明代码的层次关系 缩进是Python语言中表明程序框架的唯一手段 注释 注释:程序员在代码中加入的说明信息,不被计算机执行 注释的两种方法: 单行注释以# 阅读全文
posted @ 2018-02-17 15:37 wangziyan 阅读(476) 评论(0) 推荐(0)