112 ms Can anyone tell me the complexity of my code (sorry i am new to cs)

  • 0

    Can anyone tell me the complexity of my code, sorry i am new in cs

    class Solution(object):
        def findMedianSortedArrays(self, nums1, nums2):
            whole_list = nums1 + nums2
            n = len(whole_list)
            if n%2 == 0:
                return(whole_list[divmod(n, 2)[0]])

  • 0

    Your supposed to do it without using sort().

  • 0

    Oh i see is that a standard during interview questions?
    Because the description didn t say any thing about restrictions.
    Sorry for the beginner questions, I am new to this

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.