Re: techbayarea.us Abridged summary of leetcode-meetup@googlegroups.com - 11 updates in 1 topic

10 views
Skip to first unread message

Gowrima

unread,
Nov 29, 2025, 2:35:50 PMNov 29
to leetcod...@googlegroups.com
class Solution:
def countPoints(self, rings: str) -> int:
num_rods = 0
color_to_rod = {}
i = 0

# rings = rings[::-1]

if len(rings) < 6:
return 0

while i < len(rings):
color = rings[i]
rod = rings[i + 1]

if rod not in color_to_rod:
color_to_rod[rod] = set()

color_to_rod[rod].add(color)

i += 2

for rod in color_to_rod:
if len(color_to_rod[rod]) == 3:
num_rods += 1

return num_rods


Best,
gowrima


On Sat, 22 Nov 2025 at 15:25, <leetcod...@googlegroups.com> wrote:
daryl...@gmail.com <daryl...@gmail.com>: Nov 22 09:41AM -0800

*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.
...more
Gayathri Ravichandran <gay...@gmail.com>: Nov 22 09:58AM -0800

Hi,
Do you all meet at the library or only on Google meet?
 
Thanks,
Gayathri
 
...more
FloM <flo...@gmail.com>: Nov 22 10:09AM -0800

Hi Gayathri,
Daryl may be a little late to the library. People (at least Daryl) meet at
the "Tech Center" in the library. When you enter the library turn right and
it's a glass enclosed room. ...more
Allen S. <allen....@gmail.com>: Nov 22 10:46AM -0800

func matchPlayersAndTrainers(players []int, trainers []int) int {
// preprocessing
slices.Sort(players)
slices.Sort(trainers)
j := 0
result := 0
for i := range players {
for j < len(trainers) { ...more
Anuj Patnaik <patnai...@gmail.com>: Nov 22 10:52AM -0800

class Solution:
def matchPlayersAndTrainers(self, players: List[int], trainers: List[int])
-> int:
sorted_players = Solution.sort(self, players)
sorted_trainers = Solution.sort(self, trainers) ...more
Anuj Patnaik <patnai...@gmail.com>: Nov 22 10:54AM -0800

class Solution:
def sortArray(self, nums: List[int]) -> List[int]:
if len(nums) == 1:
return nums
mid = len(nums) // 2
left_merge_arr = nums[0: mid]
right_merge_arr = nums[mid:] ...more
Rudy W <ijo...@gmail.com>: Nov 22 11:33AM -0800

class Solution:
 
# let's use merge sort
def sortArray(self, nums: List[int]) -> List[int]:
self.mergeSort(nums)
return nums
 
def merge(self, nums: List[int], left_part: List[int], right_part: ...more
Gowrima Jayaramu <kj.go...@gmail.com>: Nov 22 12:17PM -0800

class Solution:
def matchPlayersAndTrainers(self, players: List[int], trainers: List[int])
-> int:
players.sort()
trainers.sort()
i, j, result = 0, 0, 0
 
for i in range(len(players)): ...more
Carlos Green <verd...@gmail.com>: Nov 22 12:58PM -0800

function sortArray(nums: number[]): number[] {
if (nums.length <= 1) return nums
 
const pivot: number = Math.floor(Math.random() * nums.length)
const value: number = nums[pivot]
...more
Rudy W <ijo...@gmail.com>: Nov 22 01:20PM -0800

class Solution:
def matchPlayersAndTrainers(self, players: List[int], trainers: List[int])
-> int:
players.sort()
trainers.sort()
 
p, t = 0, 0
count = 0
 
while p < len(players) and t < ...more
FloM <flo...@gmail.com>: Nov 22 02:53PM -0800

912. Sort an Array
<https://leetcode.com/problems/sort-an-array/description/?envType=problem-list-v2&envId=radix-sort> Medium
56.1%
MergeSort Time: O(n*lgN) Mem: O(n)
class Solution {
public: ...more
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to leetcode-meet...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages