- 博客(10)
- 资源 (1)
- 收藏
- 关注
原创 2020-10-11
udp_rcv#include <stdio.h>#include <string.h>#include <sys/types.h>#include <netinet/in.h>#include <sys/socket.h>#include <errno.h>#include <stdlib.h>#include <arpa/inet.h>int main(int argc, char *
2020-10-11 22:06:08 111
原创 2020-09-10
inet_addr和inet_addr的用法inet_addr函数将点分十进制的的字符串转换为32位网络字节序的IP信息。in_addr_t inet_addr(__const char * __cp)inet_network函数将点分十进制的的字符串转换为32位主机字节序的IP信息。in_addr_t inet_network(__const char * __cp)inet_ntoa将32位的网络字节顺序的IP信息转换成点分是进制的字符串方式。```c在这里插入代码片```#inc
2020-09-10 14:38:34 109
原创 Valid Number
Validate if a given string is numeric.Some examples: “0” => true ” 0.1 ” => true “abc” => false “1 a” => false “2e10” => true Note: It is intended for the problem statement to be ambiguous. You s
2017-10-21 17:40:06 181
转载 Parlindrome Number
Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints: Could negative integers be palindromes? (ie, -1)If you are thinking of converting the integ
2017-10-21 16:52:53 355
原创 Non-decreasing Array
Given an array with n integers, your task is to check if it could become non-decreasing by modifying at most 1 element.We define an array is non-decreasing if array[i] <= array[i + 1] holds for every i
2017-09-11 17:56:09 259
原创 Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.Examples:Given “abcabcbb”, the answer is “abc”, which the length is 3.Given “bbbbb”, the answer is “b”, with the le
2017-07-22 16:18:38 227
原创 Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it
2017-07-21 23:58:22 199
原创 Two Sum
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 same ele
2017-07-19 22:06:21 219
原创 Reverse Integer
Reverse digits of an integer.Example1: x = 123, return 321 Example2: x = -123, return -321click to show spoilers.Note: The input is assumed to be a 32-bit signed integer. Your function should return
2017-07-18 22:43:30 178
原创 leetcode中字符串转换为整数
Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input ca
2017-07-16 23:26:51 291
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人