2015年9月20日

leetcode 283:Move Zeroes

摘要: 题目: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, g... 阅读全文

posted @ 2015-09-20 18:36 cainiao15 阅读(139) 评论(0) 推荐(0) 编辑

leetcode 226: Invert Binary Tree

摘要: 题目:Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1Trivia:This problem was inspired byt... 阅读全文

posted @ 2015-09-20 17:25 cainiao15 阅读(127) 评论(0) 推荐(0) 编辑

leetcode 217:Contains Duplicate

摘要: 题目:Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the ... 阅读全文

posted @ 2015-09-20 17:01 cainiao15 阅读(113) 评论(0) 推荐(0) 编辑

2015年9月14日

leetcode 258: Add Digits

摘要: 题目: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... 阅读全文

posted @ 2015-09-14 16:38 cainiao15 阅读(143) 评论(0) 推荐(0) 编辑

leetcode 104: Maximum Depth of Binary Tree

摘要: 题目: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... 阅读全文

posted @ 2015-09-14 16:32 cainiao15 阅读(104) 评论(0) 推荐(0) 编辑

leetcode 237: Delete Node in a Linked List

摘要: 题目: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... 阅读全文

posted @ 2015-09-14 16:26 cainiao15 阅读(126) 评论(0) 推荐(0) 编辑

2015年7月21日

informix:字符串截取与拼接

摘要: 要求:informix数据里,给定的字符串为“20150702” ,而数据库存储的为varchar类型的deal_time数据“2015-07-02”要求是查询的deal_time>=给定字符串的数据解决方案:因为两者都是字符串类型,所以用字符串的截取与拼接,目的是将“20150702”转化为数据库... 阅读全文

posted @ 2015-07-21 17:14 cainiao15 阅读(8362) 评论(0) 推荐(0) 编辑

导航