二叉树的的创建和遍历是数据结构中的基本算法,在此统一归纳总结。 1.二叉树的定义 struct Node { […]
题目描述: 给定一个带有头节点的单链表,输出逆序反转后的链表 分析:链表的转置是一个很常见、很基础的数据结构题 […]
题目描述: 一根绳子长度为1,在绳子上任取两点,将绳子分成3段,计算这3段构成三角形的概率.
There are two sorted arrays nums1 and nums2 of size m a […]
Given a string s, find the longest palindromic substrin […]
Given a string, find the length of the longest substrin […]
You are given two non-empty linked lists representing t […]
Follow up for “Remove Duplicates”: What if […]
指针和引用在实际开发中用的比较多,但是要说他们俩的区别,能说出个一二来,但是却没法说出详细的区别,趁此总结一下 […]
Given an array and a value, remove all instances of tha […]
You are given an n x n 2D matrix representing an image. […]
There are N gas stations along a circular route, where […]
问题描述: 给定一个数据流,要求从n个元素中等概率的采样k个样本点,n的数值未知并且数量很大。 解析: 如果n […]
python中的下划线(_)用的比较多,在这里一并归纳总结,分别对每种使用情况做一下介绍。 1.单下划线(_) […]
概述 排序有内部排序和外部排序,内部排序是数据记录在内存中进行排序,而外部排序是因排序的数据很大,一次不能容纳 […]