作为一名 Java 编程语言的开发者,我们早已习惯了使用命令式编程和面向对象对象,因为 Java 从第一个版本开始就是支持这些编程方式。然而在 Java 8 中我们获得了一组强大的新的函数特性和语法。函数式编程已经有十几年的历史,与面向对象的编程方式相比,函数式编程更简洁、更具表达力、更不容易出错, ...
分类:
编程语言 时间:
2020-07-11 12:59:59
阅读次数:
63
字典的概念 Python中,字典是一系列键-值对(Key-Value),每个键都与一个值相关联。这个值可以是数字、字符串、列表乃至字典。通过键可以访问与之相关联的值。 在字典中,可以存储任意数量的键-值对。特别的,键-值对数量为0的字典被称作空字典。 alien_0 = { 'color' : 'g ...
分类:
编程语言 时间:
2020-07-11 12:55:01
阅读次数:
71
You are given a doubly linked list which in addition to the next and previous pointers, it could have a child pointer, which may or may not point to a ...
分类:
其他好文 时间:
2020-07-11 10:04:24
阅读次数:
84
目录 概述 Iterable和Iterator Collection List Queue Set Map 概述 Java中基本的常用的集合类,主要包含: List Set Queue Map 这几种类型的继承关系如图: 图片引自——Collection 和 Map的继承体系 其中 List、Que ...
分类:
编程语言 时间:
2020-07-11 09:59:54
阅读次数:
80
1、mapmap和javascript中的数组的map方法类似 const getData = (param) => { return of(`return: ${param}`).pipe( delay(Math.random() * 1000) ) }; from([1, 2, 3, 4,5]) ...
分类:
其他好文 时间:
2020-07-11 09:32:37
阅读次数:
69
Flatten a Multilevel Doubly Linked List (M) 题目 You are given a doubly linked list which in addition to the next and previous pointers, it could have a ...
分类:
其他好文 时间:
2020-07-11 09:25:02
阅读次数:
50
归并排序: 先分治后归并。 edit play_arrow brightness_4 /* Java program for Merge Sort */ class MergeSort { // Merges two subarrays of arr[]. // First subarray is ...
分类:
编程语言 时间:
2020-07-10 23:51:51
阅读次数:
78
题目链接 https://leetcode-cn.com/problems/intersection-of-two-linked-lists/ 初次读题 初次读题可知 两个指针相同即需要求得的结果 链表长度可能不同 两个链表可能没有交叉点,此时返回NULL 不可修改链表结构 链表中无循环 我第一次读 ...
分类:
其他好文 时间:
2020-07-10 23:51:38
阅读次数:
63
题目 Given two binary strings, return their sum (also a binary string). The input strings are both non-empty and contains only characters 1 or 0. Exampl ...
分类:
其他好文 时间:
2020-07-10 20:58:33
阅读次数:
56
LC148 two-sum 题意:数组中找出两个加起来等于目标值的数 题解:unordered存值对应下标,注意相同数的特判 LC147 median-of-two-sorted-arrays 题意:两个有序数组中位数 题解:Kth(A,m,B,n,k),若m>n交换,pa=min(k/2,m),p ...
分类:
其他好文 时间:
2020-07-10 15:23:31
阅读次数:
60