摘要: https://leetcode.com/problems/number-of-1-bits/ Write a function that takes an unsigned integer and returns the number of '1' bits it has (also known 阅读全文
posted @ 2018-11-27 22:32 丧心病狂工科女 阅读(144) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/triangle/ Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on 阅读全文
posted @ 2018-11-27 20:19 丧心病狂工科女 阅读(128) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/valid-palindrome/ Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring 阅读全文
posted @ 2018-11-27 16:13 丧心病狂工科女 阅读(130) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/remove-duplicates-from-sorted-list/ Given a sorted linked list, delete all duplicates such that each element appear only 阅读全文
posted @ 2018-11-27 15:54 丧心病狂工科女 阅读(118) 评论(0) 推荐(0) 编辑
摘要: https://pintia.cn/problem-sets/994805260223102976/problems/994805264706813952 给定一段一段的绳子,你需要把它们串成一条绳。每次串连的时候,是把两段绳子对折,再如下图所示套接在一起。这样得到的绳子又被当成是另一段绳子,可以再 阅读全文
posted @ 2018-11-27 13:17 丧心病狂工科女 阅读(163) 评论(0) 推荐(0) 编辑
摘要: https://pintia.cn/problem-sets/994805260223102976/problems/994805262953594880 给定一个单链表,请编写程序将链表元素进行分类排列,使得所有负值元素都排在非负值元素的前面,而 [0, K] 区间内的元素都排在大于 K 的元素前 阅读全文
posted @ 2018-11-27 12:50 丧心病狂工科女 阅读(345) 评论(0) 推荐(0) 编辑
摘要: https://pintia.cn/problem-sets/994805260223102976/problems/994805296180871168 给定一个常数 K 以及一个单链表 L,请编写程序将 L 中每 K 个结点反转。例如:给定 L 为 1→2→3→4→5→6,K 为 3,则输出应该 阅读全文
posted @ 2018-11-27 11:46 丧心病狂工科女 阅读(413) 评论(0) 推荐(1) 编辑