All Questions
45 questions
2
votes
1
answer
110
views
Move timestamp to the next Monday 10:01 AM [closed]
I've been battling ChatGPT for hours now and can't get satisfied with this simple algorithm in TypeScript. These two (hopefully correct) TypeScript+ReactNative solutions should move the timestamp ...
3
votes
1
answer
135
views
6
votes
4
answers
3k
views
Find all letter Combinations of a Phone Number
The task
is taken from LeetCode
Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. A
mapping of digit to letters (just ...
2
votes
1
answer
762
views
Given time intervals determine if a person could attend all meetings
The task is taken from LeetCode
Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] ...
1
vote
1
answer
292
views
Merge k Sorted Lists
The task is taken from LeetCode
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.
Example:
...
8
votes
1
answer
2k
views
Merge Intervals in JavaScript
This is a task taken from Leetcode -
Given a collection of intervals, merge all overlapping intervals.
Example 1:
...
2
votes
1
answer
2k
views
Find common characters (LeetCode)
The task
is taken from leetcode
Given an array A of strings made only from lowercase letters, return a
list of all characters that show up in all strings within the list
(including duplicates). ...
3
votes
2
answers
907
views
Robot Return to Origin
The task
is taken from leetcode
There is a robot starting at position (0, 0), the origin, on a 2D
plane. Given a sequence of its moves, judge if this robot ends up at
(0, 0) after it completes ...
1
vote
2
answers
118
views
Flipping an Image
The task
is taken from leetcode
Given a binary matrix A, we want to flip the image horizontally, then
invert it, and return the resulting image.
To flip an ...
1
vote
1
answer
531
views
Sort Array By Parity
The task is taken from leetcode
Given an array A of non-negative integers, return an array consisting
of all the even elements of A, followed by all the odd elements of A.
You may return any ...
0
votes
1
answer
61
views
Items also occurs in a set
The task
You're given strings J representing the types of stones that are
jewels, and S representing the stones you have. Each character in S
is a type of stone you have. You want to know how ...
2
votes
0
answers
733
views
Determine whether there exists a one-to-one character mapping from one string to another
The task
Determine whether there exists a one-to-one character mapping from one
string s1 to another s2.
For example, given s1 = abc and s2 = bcd, return true since we can map
a to b, b to c, and c ...
1
vote
2
answers
1k
views
Sum of two numbers in array
The task
You are given two non-empty arrays representing two non-negative
integers. The digits are stored in reverse order and each of their
items contain a single digit. Add the two numbers and ...
1
vote
1
answer
1k
views
Find busiest period in building
The task
You are given a list of data entries that represent entries and exits
of groups of people into a building. An entry looks like this:
{"timestamp": 1526579928, count: 3, "type": "...
0
votes
1
answer
870
views
Find indices of two numbers such that they add up to a target
The task
...is taken from leetcode
Given an array of integers, return indices of the two numbers such
that they add up to a specific target.
You may assume that each input would have exactly ...