@@ -0,0 +1,1276 @@
+public class Solution %7B%0A    public boolean makesquare(int%5B%5D nums) %7B%0A        if(nums == null %7C%7C nums.length%3C4)%7B%0A            return false;%0A        %7D%0A        int sum = 0;%0A        for(int i=0;i%3Cnums.length;i++)%7B%0A            sum+=nums%5Bi%5D;%0A        %7D%0A        %0A        if(sum %254 !=0)%7B%0A            return false;%0A        %7D%0A        %0A        Arrays.sort(nums);%0A        reverse(nums);%0A        %0A        return dfs(nums,new int%5B4%5D, 0, sum/4);%0A    %7D%0A    %0A    private boolean dfs(int%5B%5D nums, int%5B%5D sums, int index, int target)%7B%0A        if(index == nums.length)%7B%0A            if(sums%5B0%5D == target && sums%5B1%5D == target && sums%5B2%5D == target)%7B%0A                return true;%0A            %7D%0A            return false;%0A        %7D%0A        %0A        for(int i=0;i%3C4;i++)%7B%0A            if(sums%5Bi%5D+nums%5Bindex%5D%3Etarget)%7B%0A                continue;%0A            %7D%0A            sums%5Bi%5D+= nums%5Bindex%5D;%0A            if(dfs(nums,sums,index+1,target))%7B%0A                return true;%0A            %7D%0A            sums%5Bi%5D -= nums%5Bindex%5D;%0A        %7D%0A        return false;%0A    %7D%0A    %0A    private void reverse(int%5B%5D nums)%7B%0A        int l = 0;%0A        int r = nums.length-1;%0A        while(l%3Cr)%7B%0A            int tmp = nums%5Bl%5D;%0A            nums%5Bl%5D = nums%5Br%5D;%0A            nums%5Br%5D = tmp;%0A            l++;%0A            r--;%0A        %7D%0A    %7D%0A%7D

Need to rewrite 473