摘要:        
题目简介: 给定的数组,给定的k,数组中的是否可以选出若干个数字之和为k 数组:nums 数量为n 目标和为k 代码如下: public class PartSum { static int n; static int k; static int[] nums; public static void    阅读全文
posted @ 2021-08-31 16:07
吃心王
阅读(174)
评论(0)
推荐(0)
        
            
        
        
摘要:        
##二分查找 public static boolean BinSearch(int[] nums,int aNum){ int left = 0; int midium; int right = nums.length-1; while( left <= right ){ midium = (le    阅读全文
posted @ 2021-08-31 15:30
吃心王
阅读(51)
评论(0)
推荐(0)
        
                    
                
浙公网安备 33010602011771号