posted @ 2016-03-28 00:51 CSU蛋李 阅读(162) 评论(0) 推荐(0) 编辑
摘要:
Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Supposed the linked list is 1 -> 2 -> 3 - 阅读全文
摘要:
Given two strings s and t, write a function to determine if t is an anagram of s. For example,s = "anagram", t = "nagaram", return true.s = "rat", t = 阅读全文
posted @ 2016-03-27 02:26 CSU蛋李 阅读(105) 评论(0) 推荐(0) 编辑
摘要:
Given an integer, write a function to determine if it is a power of three. Follow up:Could you do it without using any loop / recursion? 最大的int 型3的幂是1 阅读全文
posted @ 2016-03-27 02:15 CSU蛋李 阅读(132) 评论(0) 推荐(0) 编辑
摘要:
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 阅读全文
posted @ 2016-03-27 02:11 CSU蛋李 阅读(117) 评论(0) 推荐(0) 编辑
摘要:
Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For exa 阅读全文
posted @ 2016-03-27 01:49 CSU蛋李 阅读(104) 评论(0) 推荐(0) 编辑
摘要:
Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a lette 阅读全文
posted @ 2016-03-23 21:14 CSU蛋李 阅读(194) 评论(0) 推荐(0) 编辑
摘要:
Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the 阅读全文
posted @ 2016-03-21 22:43 CSU蛋李 阅读(117) 评论(0) 推荐(0) 编辑