摘要:
Write a function that takes a string as input and returns the string reversed. Example:Given s = "hello", return "olleh". 题目:给你丫一字符串,你给我倒着写。。。。 思路:我一开 阅读全文
摘要:
Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. For example, giv 阅读全文
摘要:
Invert a binary tree. to /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(i 阅读全文
摘要:
Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest l 阅读全文
摘要:
You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 ston 阅读全文