Fork me on GitHub
摘要: 输入:一些点的坐标;一个测试点 输出:是否在多边形内部 思路: (1)面积和判别法:判断目标点与多边形的每条边组成的三角形面积和是否等于该多边形,相等则在多边形内部。 (2)夹角和判别法:判断目标点与所有边的夹角和是否为360度,为360度则在多边形内部。 (3)引射线法:从目标点出发引一条射线,看 阅读全文
posted @ 2019-04-12 21:27 皮皮丶码 阅读(4599) 评论(0) 推荐(3) 编辑
摘要: 1、先自我介绍一下。 2、问到项目问题。(项目介绍,用到哪些技术,如何测试的。) 3、一些基础知识。 a) list、map、set是继承了collection的吗? List:1.可以允许重复的对象。 2.可以插入多个null元素。 3.是一个有序容器,保持了每个元素的插入顺序,输出的顺序就是插入 阅读全文
posted @ 2019-04-11 22:39 皮皮丶码 阅读(307) 评论(0) 推荐(0) 编辑
摘要: TCP面向字节流的(就是说TCP传送时是按照一个一个字节来传送的) TCP连接的建立(三次握手) 1:客户机的TCP先向服务器的TCP发送一个连接请求报文段。不含应用层数据,首部中的SYN标志位被置为1.另外,客户机会随机选择一个起始序号seq=x(连接请求报文不携带数据,但要消耗一个序号)。 2: 阅读全文
posted @ 2019-04-02 16:16 皮皮丶码 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 2. Add Two Numbers You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse orderand each of 阅读全文
posted @ 2018-12-20 22:58 皮皮丶码 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 28、Implement strStr() Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Exa 阅读全文
posted @ 2018-12-19 17:13 皮皮丶码 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 27、 Remove Element Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra s 阅读全文
posted @ 2018-12-19 16:43 皮皮丶码 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 示例无向图如下:(起始点为v0) 邻接矩阵为: 注意:其中没有连接的边和自己到自己的点权值用10000表示。 代码: 结果 解析: 分三部分,主函数中给出图中的初始邻接矩阵,顶点个数。以及初始化最短路径的顶点集合和点路线集合。 IsContain(int m,int[] S)这个函数是在每次循环的时 阅读全文
posted @ 2018-11-30 17:15 皮皮丶码 阅读(515) 评论(0) 推荐(0) 编辑
摘要: 26、Remove Duplicates from Sorted Array Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return th 阅读全文
posted @ 2018-11-30 13:22 皮皮丶码 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 21、 Merge Two Sorted Lists Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of th 阅读全文
posted @ 2018-11-30 12:04 皮皮丶码 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 20、Valid Parentheses Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input s 阅读全文
posted @ 2018-11-29 15:09 皮皮丶码 阅读(204) 评论(0) 推荐(0) 编辑