Python fast one liner


  • 0
    T
    class Solution(object):
        def findContentChildren(self, g, s):
            """
            :type g: List[int]
            :type s: List[int]
            :rtype: int
            """
            return s.sort() or len([s.pop() for x in sorted(g)[::-1] if s and s[-1] >= x])
    

Log in to reply
 

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