Tag: c++
You are given two strings s and t. String t is generated by random shuffling string s and then add one more letter at a random position. Return the …
Given a non-negative integer n, please find out the number of integers that have the unique digits between [0, 10^n). For example, if n = 2, there are 91 …
Given a 32-bit DWORD, and two threads A and B, do they require Mutex (exclusive resources) to read/write the High/Low DWORD respectively? e.g. Thread A reads two low bytes …
There are two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. nums1 has enough space to hold additional elements from nums2. The number …
Given a linked list, swap every two adjacent nodes and return its head. You may not modify the values in the list’s nodes. Only nodes itself may be changed. …