这个题目是贪心算法的基础练习题,解决思路是排序双指针谈心法,先将两个数组分别排序,优先满足最小胃口的孩子。(本题完整题目附在了最后面) 代码如下:
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…
下载vscode deb安装包
Get Started with C on Linux in Visual Studio Code
1. 安装vscode
sudo dpkg -i code_1.83.0-1696350811_amd64.deb
2. 确保gcc编译器已经安装
g --version 如果没有安装,执行以下命令安装
sudo apt-get update
sudo apt-get install …