题目: 输入一个链表,输出该链表中倒数第k个结点。 分析: 第一个解法,我们可以先遍历一遍链表,计算下节点的总数n,然后再从头结点查n-k个节点,即是倒数第k个节点。 第二个解法,便是使用双指针,两个指针都先指向头节点,第一个指针先前进k-1个节点,然后两指针一起前进,当第一个指针到达尾节点时,第二 ...
分类:
编程语言 时间:
2019-11-17 23:37:32
阅读次数:
117
十一月 16, 2019 11:49:47 上午 org.apache.catalina.core.StandardWrapperValve invoke严重: Servlet.service() for servlet [com.vfsd.net.GetImgFromHTML] in contex ...
分类:
编程语言 时间:
2019-11-16 14:45:10
阅读次数:
390
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the hist ...
分类:
其他好文 时间:
2019-11-10 10:13:49
阅读次数:
82
https://loj.ac/problem/10050 题目描述 给出$n$个整数,求选出两个数使它们的异或值最大。 思路 解决异或问题也是字典树的常用作用之一。我们考虑对于一个数$x$,我们如何求出它的异或值最大的另一个数。异或的定义是每一位相同为 ...
分类:
其他好文 时间:
2019-11-03 18:28:55
阅读次数:
71
原题链接在这里:https://leetcode.com/problems/largest-1-bordered-square/ 题目: Given a 2D grid of 0s and 1s, return the number of elements in the largest square ...
分类:
其他好文 时间:
2019-11-03 10:52:24
阅读次数:
99
find index of top 3 largest values of each column: map dataframe column load a dictionay from a save pkl file find the startpoint of each session (aft ...
分类:
其他好文 时间:
2019-11-01 11:20:00
阅读次数:
70
import java.util.* /** * 378. Kth Smallest Element in a Sorted Matrix * https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/descript... ...
分类:
其他好文 时间:
2019-10-28 00:44:03
阅读次数:
96
Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's triangle. Note that the row index starts from 0. In Pascal's trian ...
分类:
其他好文 时间:
2019-10-27 00:59:59
阅读次数:
105
结对成员:钟苑莉 张冰微 一、 Github项目地址:https://github.com/Clarazhangbw/ruangongjd 二、PSP表格 PSP2.1 Personal Software Process Stages 预估耗时(分钟) 实际耗时(分钟) Planning 计划 30 ...
分类:
编程语言 时间:
2019-10-17 01:28:59
阅读次数:
110
Base16 Base16编码使用16个ASCII可打印字符(数字0-9和字母A-F)对任意字节数据进行编码。Base16先获取输入字符串每个字节的二进制值(不足8比特在高位补0),然后将其串联进来,再按照4比特一组进行切分,将每组二进制数分别转换成十进制,在下述表格中找到对应的编码串接起来就是Ba ...
分类:
其他好文 时间:
2019-10-16 13:24:11
阅读次数:
125