摘要:
Problem:Remove all elements from a linked list of integers that have value val;ExampleGiven :1->2->6->3->4->5->6 val=6Return:1->2->3->4->5Solution: 1 ... 阅读全文
摘要:
Problem: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. ... 阅读全文
摘要:
Problem: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... 阅读全文
摘要:
题目描述:请实现一个函数,将一个字符串中的空格替换成“%20”。例如,当字符串为We Are Happy.则经过替换之后的字符串为We%20Are%20Happy。Solution:#include using namespace std;void replaceBlank(char str[],i... 阅读全文
摘要:
Problem:Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are s... 阅读全文