
LeetCode_C#
YvelineLong
这个作者很懒,什么都没留下…
展开
-
【LeetCode】(C#)389. Find the Difference(Easy)
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 letter that was原创 2017-12-27 10:55:35 · 222 阅读 · 0 评论 -
【LeetCode】(C#)461. Hamming Distance(Easy)
The Hamming distance between two integers is the number of positions at which the corresponding bits are different.Given two integers x and y, calculate the Hamming distance.Note:0 ≤ x,原创 2017-12-27 11:08:02 · 289 阅读 · 0 评论 -
【LeetCode】(C#)13. Roman to Integer(Easy)
Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999. public int RomanToInt(string s) { Dictionary roman=new Dictionary{{'I', 1},原创 2017-12-27 11:15:06 · 346 阅读 · 0 评论 -
【LeetCode】(C#)155. Min Stack(Easy)
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get原创 2017-12-27 11:21:36 · 221 阅读 · 0 评论 -
【LeetCode】(C#)1. Two Sum(Easy)
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, and you may not use the sam原创 2017-12-27 11:17:52 · 225 阅读 · 0 评论