![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Lua
wenniuwuren
Winter is coming
展开
-
LeetCode ---- Add Digits (Java/Lua 实现)
题目:Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.For example:Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Sin原创 2016-10-21 17:00:53 · 773 阅读 · 0 评论 -
LeetCode ---- Find the Difference (Java/Lua 实现)
题目:Given two strings s and t which consist of only lowercase letters.String t is generated by random shuffling string s and then add one more letter at a random position.Find the lette原创 2016-10-24 13:43:34 · 1161 阅读 · 0 评论 -
LeetCode ---- Two Sum (Java Lua 实现)
题目: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 would have exactly one solution.Example:Giv原创 2016-10-14 17:35:39 · 836 阅读 · 0 评论 -
LeetCode ---- Nim Game (Java/Lua 实现)
题目: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 stones. The one who removes the last stone wi原创 2016-10-17 10:54:10 · 904 阅读 · 0 评论 -
LeetCode ---- Single Number (Java/Lua 实现)
问题:Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without us原创 2016-10-17 20:21:44 · 712 阅读 · 0 评论 -
LeetCode ---- Fizz Buzz (Java/Lua 实现)
题目:Write a program that outputs the string representation of numbers from 1 to n.But for multiples of three it should output “Fizz” instead of the number and for the multiples of five outp原创 2016-10-20 20:34:11 · 2970 阅读 · 0 评论