JAVA || Fast solution with easy explanation || Sorting, prefix-sum and Binary-search
Explanation:\n1. Sort the array nums, it will help us to create the prefix array of consecutive sum of all elements.\n2. Transform the nums array to prefix sum 
**Explanation:**\n1. Sort the array `nums`, it will help us to create the prefix array of consecutive sum of all elements.\n2. Transform the `nums` array to prefix sum array (saves SC).\n3. Create a result array.\n4. For every element of `queries` array run binary search and find the upper bound and store it in result array.\n\n\n\n```\nclass Solution {\n    public int[] answerQueries(int[] nums, int[] queries) {\n        Arrays.sort(nums);     \n        for(int i=1;i<nums.length;i++)\n            nums[i]+=nums[i-1];\n        int res[]=new int[queries.length];\n        for(int i=0;i<queries.length;i++)\n            res[i]=Math.abs((Arrays.binarySearch(nums,queries[i]))+1);\n        return res;\n    }\n}\n```
['Binary Search', 'Sorting', 'Binary Tree', 'Prefix Sum', 'Java']