摘要:
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font 阅读全文
摘要:
There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sh 阅读全文
摘要:
Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng 阅读全文
摘要:
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single 阅读全文
摘要:
Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "olleh". 在这里介绍python中字符串翻转的几种方法: 1.步 阅读全文
摘要:
简洁既是美,程序员应尽量尝试编写简洁的表达式,争取用简单的代码来实现更多的功能,当然,这也要看情况了(有时候也得考虑程序运行的时间嘛)。 在阅读C++Prime Plus到while语句时有一个讲一个数组内容复制到另一个数组的例子: //arr1 is an array if ints int *s 阅读全文