摘要: 给你一个字符串 s,找到 s 中最长的回文子串 s = "abcddcboa" list1 = list(s) list2 = list(reversed(list1)) def test(s,max_lengh): list1 = list(s) list2 = list(reversed(lis 阅读全文
posted @ 2022-01-31 01:10 我不知道取什么名字好 阅读(26) 评论(0) 推荐(0)
摘要: 给定两个大小分别为 m 和 n 的正序(从小到大)数组 nums1 和 nums2。请你找出并返回这两个正序数组的 中位数 。 算法的时间复杂度应该为 O(log (m+n)) nums2 = [1,] nums1 = [54,78,90,] def test(nums): lengh = len( 阅读全文
posted @ 2022-01-31 00:13 我不知道取什么名字好 阅读(37) 评论(0) 推荐(0)