🌷🍁 博主猫头虎(🐅🐾)带您 Go to New World✨🍁 🦄 博客首页——🐅🐾猫头虎的博客🎐 🐳 《面试题大全专栏》 🦕 文章图文…
这个题目是贪心算法的基础练习题,解决思路是排序双指针谈心法,先将两个数组分别排序,优先满足最小胃口的孩子。(本题完整题目附在了最后面) 代码如下:
class Solution(object):def findContentChildren(se…
[python 刷题] 4 Median of Two Sorted Arrays
题目: 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 ( l o g ( m n ) ) O(log (mn)) O(lo…