原文在这,可以来我blog翻翻哦。 第二天。今天AC掉了一道之前没AC掉的题目。。。 今天的题目是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 pattern in a fixed font for better legibility) {代...
原文在此, 可以来我Blog翻翻哦。 hhh, 开始一天一道LeetCode吧, 恩, 忘记了之前算到第几天了, 那么从头开始吧, 今天是第一天. 今天的题目是(8. String to Integer (atoi))[[链接]] 题目描述: Implement atoi which converts a string to an integer. The function first discards as many whitespace characters as nece...
Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h is the height of the person and k is the number of people in front of this person who have a height greater than or equal to h. Write an algorithm to reconstruct the queue.
本文首发于我的blog中 题目是Count Complete Tree Nodes: 题目描述: Given a complete binary tree, count the number of nodes. Definition of a complete binary tree from Wikipedia:In a complete binary tree every level, except possibly the last, is completely filled, and all nodes in the last level are ...
You are given two non-empty linked lists representing two non-negative integers. The most significant digit comes first and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.