Hashmap advanced
4Sum II Given four integer arrays nums1, nums2, nums3, and nums4 all of length n, return the number of tuples (i, j, k, l) such that: 0 <= i, j, k, l < n nums1[i] + nums2[j] +...
4Sum II Given four integer arrays nums1, nums2, nums3, and nums4 all of length n, return the number of tuples (i, j, k, l) such that: 0 <= i, j, k, l < n nums1[i] + nums2[j] +...
The TCP/IP five network model Layer Protocal Content Address 5 Application HTTP, SMTP, etc… Message n/a ...
What is HashTable Official definition: A hash table is a data structure that allows direct access based on the value of the key. To put it simply, an array is actually a hash table. In a hash...
Swap Nodes in Pairs Given a linked list, swap every two adjacent nodes and return its head. You must solve the problem without modifying the values in the list’s nodes (i.e., only nodes themsel...
Linked List What is Linked List? Linked List is a linear data structure in which elements are not stored at a contiguous location, rather they are linked using pointers. Linked List forms a seri...
Remove Linked List Elements Given the head of a linked list and an integer val, remove all the nodes of the linked list that has Node.val == val, and return the new head. Method one: Why we ...
Squares of a Sorted Arrays Given an integer array nums sorted in non-decreasing order, return an array of the squares of each number sorted in non-decreasing order. The ordinary method is to ...
What is Array? An array is a collection of the same type of data stored in a contiguous memory space. Note: Array’s subscripts start at 0. The array’s memory space is contiguous. Since th...
The question is following: This question can use a simple two-for loop + DFS to solve, it’s not the point I summarize today. The true thing I want to discuss is the Pass by value in Java. Here i...
Dear readers, have you ever found yourselves puzzled by the following: With the internet awash in a deluge of information, where false information runs rampant, how can one sift through the mountai...