Find Friends & Solve LeetCode at FriendZone Discord
- Share this discussion
- Copy link
- Share on X (Twitter)
Summary
FriendZone | Make Friends & Chat ⋅ Active Social Fun ⋅ Chill ⋅ VC is the perfect place to connect with others. This announcement highlights the community's vibrant mix of social interaction and technical collaboration, featuring members who enjoy solving complex LeetCode problems together. Join us to find new friends, engage in active discussions, and participate in coding challenges in a fun, chill environment.
Im tryna find new friends
18m looking for everyone
Down for everything
Try not to be boring
No bots
Im bored so pls dm
down for some HARD leetcode questions?
no
"Down for everything" ur words not mine
you drive him crazy, lol
i can do that to u too
try bro
true lol
Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays.
The overall run time complexity should be O(log (m+n))
damn, i am a professional programmer
i can do that in mins.
do it
man
it's not easy
😵💫
share your leetcode profile or anything like that, bro!
what will i get in return?
my attention
💪
ive got plenty from others : )
you will have 1 foolish guy as your friend
def findMedianSortedArrays(nums1, nums2):
# Always binary-search the smaller array
if len(nums1) > len(nums2):
nums1, nums2 = nums2, nums1
m, n = len(nums1), len(nums2)
left, right = 0, m
half = (m + n + 1) // 2
while left <= right:
i = (left + right) // 2
j = half - i
# Boundary values
Aleft = nums1[i - 1] if i > 0 else float("-inf")
Aright = nums1[i] if i < m else float("inf")
Bleft = nums2[j - 1] if j > 0 else float("-inf")
Bright = nums2[j] if j < n else float("inf")
# Correct partition
if Aleft <= Bright and Bleft <= Aright:
if (m + n) % 2 == 1:
return max(Aleft, Bleft)
return (max(Aleft, Bleft) + min(Aright, Bright)) / 2
# Too far right in nums1
elif Aleft > Bright:
right = i - 1
# Too far left in nums1
else:
left = i + 1
I'm back
you got my attention
lol
Tnks
larper alert
you must be senior in log(n+m)
u bet
I am a genius
and it took some time for you to solve that log(n+m) problem at the first place.
and use that to test someone cuz the problem is short.
bruh send me ur lc profile
ill refer u
i am not active on it.
haven't been solving it for years
what about projects?
??
have u built any projects? how old r u?
haha
take it easy bro
He's my small bro
uhhh
Who r uuu
Colorful?
kiddo
Animal
👍
🤣
Any Gender?