自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

豪华的资源回收

回收资源

  • 博客(22)
  • 收藏
  • 关注

原创 771. Jewels and Stones

You’re given strings J representing the types of stones that are jewels, and S representing the stones you have. Each character in S is a type of stone you have. You want to know how many of the sto...

2019-02-24 10:03:06 103

原创 网络编程-004-Raw-socket

Raw-socket 与 标准 socket 的区别Raw-socket (原始套接字) 置于操作系统的网络核心标准 socket 在 TCP 和 UDP 协议外围Raw-socket 直接使用 IP 协议, 无连接Raw-socket 实现的功能发送自定义的 IP 包发送 ICMP 包进行网络嗅探, 捕获网络数据包分析所有经过网络的数据报伪装本地的IP地址Ra...

2018-06-10 20:23:02 580

原创 网络编程-003-UDP-socket

UDP 协议的特点UDP 不要求保持一个连接UDP 没有因接收方检查数据包 (或当数据包没有正确抵达而自动重传) 而带来的开销设计UDP的目的是用于短应用和控制消息UDP要求的网络带宽比 TCP 更小使用 UDP 协议的场合传送的数据对顺序和可靠性要求不高简单的 发送 — 接收 一次通信形式传输的数据量较少发送广播或多播信息UDP 和 TCP 的区别T...

2018-06-10 20:06:10 207

原创 网络编程-002-TCP-socket

TCP协议的工作流程建立连接 通过三个报文段完成连接的建立, 该过程又称为三次握手传输数据 数据流分割成适当长度的TCP报文段, 传递给IP层进一步处理后发出给每个字节编一个序号, 确保不丢包, 接收端按顺序接收包接收端对已成功收到的字节发回一个确认 (ACK), 如果发送端在往返时延 (RTT) 内未收到确认, 重传数据关闭连接 当需要终止一个连接时, 要经过四次挥手T...

2018-06-10 18:59:25 268

原创 网络编程-001-windows-socket

socket 概念socket 中文译名套接字, 是网络通信的基本操作单元, 可以看做是不同主机之间进程进行双向通信的端点, 即通信双方的一种约定, 可用socket的相关函数来完成通信过程socket是网络通信双方之间的纽带, 应用程序在网络上发送, 接受的信息都通过socket实现socket可建立一次连接, 并对连接唯一标识socket是操作系统的资源socket 网络...

2018-06-09 19:11:19 1020

原创 网络编程-000-基础

网络编程的基本概念网络编程是指利用网络编程接口编写网络应用程序,实现网络应用程序间的信息交互功能网络编程接口是一种应用程序编程接口(API), 它包含一组通信例程或系统调用. 应用程序可以调用这些例程以便与位于相同或不同计算机上的其他应用程序通信网络应用程序间的通信必须通过网络编程接口访问网络协议提供的服务来实现网络编程的层次和种类网络编程的层次Web应用的网...

2018-06-09 15:11:13 221

原创 ruby selenium-webdriver

selenium-webdriver is a gem. Let’s see what it is. I install it bygem install selenium-webdriverand I need a browser driverbrew cask install chromedriverirb # run Interactive Ruby ...

2018-06-07 20:49:06 334

原创 Exercise Of Modern Compiler Implementation in C

Write a function int maxargs(A_stm) that tells the maximum number of argument of any print statement within any subexpression of a given statement. For example, maxargs(prog) is 2.int bigger(int f...

2018-05-06 17:51:06 573

原创 747 Largest Number At Least Twice of Others

In a given integer array nums, there is always exactly one largest element.Find whether the largest element in the array is at least twice as much as every other number in the array.If it is, retu...

2018-04-21 00:11:53 152

原创 671 Second Minimum Node In a Binary Tree

Given a non-empty special binary tree consisting of nodes with the non-negative value, where each node in this tree has exactly two or zero sub-node. If the node has two sub-nodes, then this node’s va...

2018-04-21 00:00:13 118

原创 458 Poor Pigs

There are 1000 buckets, one and only one of them contains poison, the rest are filled with water. They all look the same. If a pig drinks that poison it will die within 15 minutes. What is the minimum...

2018-04-20 23:47:37 110

原创 107 Binary Tree Level Order Traversal II

Given a binary tree, return the bottom-up level order traversal of its nodes’ values. (ie, from left to right, level by level from leaf to root).For example: Given binary tree [3,9,20,null,null,15,...

2018-04-20 20:21:22 102

原创 674 Longest Continuous Increasing Subsequence

Given an unsorted array of integers, find the length of longest continuous increasing subsequence (subarray).Example 1:Input: [1,3,5,4,7]Output: 3Explanation: The longest continuous increasing...

2018-04-20 19:33:37 103

原创 121 Best Time to Buy and Sell Stock

Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the stock),...

2018-04-20 19:27:20 138

原创 746 Min Cost Climbing Stairs

On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed).Once you pay the cost, you can either climb one or two steps. You need to find minimum cost to reach the top of ...

2018-04-20 18:56:59 108

原创 SICP Chapter1 Exercise

Exercise 1.1.Below is a sequence of expressions. What is the result printed by the interpreter in response to each expression? Assume that the sequence is to be evaluated in the order in which it is...

2018-04-20 18:23:54 166

原创 504 Base 7

Given an integer, return its base 7 string representation.Example 1: Input: 100 Output: “202” Example 2: Input: -7 Output: “-10” Note: The input will be in range of [-1e7, 1e7].class Solut...

2018-04-19 15:39:47 108

原创 541 Reverse String II

Given a string and an integer k, you need to reverse the first k characters for every 2k characters counting from the start of the string. If there are less than k characters left, reverse all of them...

2018-04-19 15:30:13 98

原创 744 Find Smallest Letter Greater Than Target

Given a list of sorted characters letters containing only lowercase letters, and given a target letter target, find the smallest element in the list that is larger than the given target.Letters also...

2018-04-19 14:55:55 107

原创 350 Intersection of Two Arrays II

Given two arrays, write a function to compute their intersection.Example: Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2].Note: Each element in the result should appear as many times a...

2018-04-19 14:33:38 100

原创 108 Convert Sorted Array to Binary Search Tree

Given an array where elements are sorted in ascending order, convert it to a height balanced BST.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the...

2018-04-19 14:04:58 123

原创 flex&bison_homework_1

1.1 Will the calculator accept a line that contains only a comment? Why not? Would it be easier to fix this in the scanner or in the parser? The program before will not accept a line that contains...

2018-03-25 17:23:58 361

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除