2026 June 20 Problems

25 views
Skip to first unread message

daryl...@gmail.com

unread,
Jun 20, 2026, 12:40:27 PMJun 20
to leetcode-meetup
Feel free to work on any of the problems you want; we'll have people present their solutions at 11:30.

Please post your solutions to this thread so others can use this as a reference.


Problems carried over from last week:


2122. Recover the Original Array Hard 41.6%


Here is the meeting url:

Full details:

Topic: Leet Code meeting
Time: Mar 28, 2026 10:00 AM Pacific Time (US and Canada)
        Every week on Sat, 110 occurrence(s)
Please download and import the following iCalendar (.ics) files to your calendar system.
Weekly: https://us05web.zoom.us/meeting/tZYocuqgqzMuH9IuHUphHIiZ_4T4IndJLToX/ics?icsToken=DJFc88pL6-me_TneLwAALAAAAA70ShjYgLH6RfEnqUm5LK03v2OgtbXujwlKXRMVgIVWCY9aONPJMCycMlkhyPZ3XSrMVVgXDSYlGF_r7DAwMDAwMQ&meetingMasterEventId=MGJmt5lJTd6mPygcS0hiAQ
Join Zoom Meeting
https://us05web.zoom.us/j/82553858456?pwd=fnK5Vb0CcfFpv0lnouILjeEs2z2Khc.1

Meeting ID: 825 5385 8456
Passcode: 182596

Anuj Patnaik

unread,
Jun 20, 2026, 1:19:22 PMJun 20
to leetcode-meetup
class Solution:
def similarPairs(self, words: List[str]) -> int:
count = 0
for i in range(len(words) - 1):
for j in range(i+1, len(words)):
if set(words[i]) == set(words[j]):
count += 1
return count


Carlos Green

unread,
Jun 20, 2026, 1:53:52 PMJun 20
to leetcode-meetup
/**
* @param {string[]} words
* @return {number}
*/
var similarPairs = function(words) {
let count = 0

for (let i = 0; i < words.length; i++) {
for (let j = i + 1; j < words.length; j++) {
const str1 = Array.from(new Set(words[i].split('').sort())).join('')
const str2 = Array.from(new Set(words[j].split('').sort())).join('')

if (str1 === str2) {
count++
}
}
}
return count
};
Reply all
Reply to author
Forward
0 new messages