Leetcode in Java && Oracle
422 subscribers
8 photos
397 files
400 links
Second channel: @codeforces_java

Let's Develop Together!
Download Telegram
image_2022-05-23_16-32-48.png
28.4 KB
#N2154. Keep Multiplying Found Values by Two
problem link
#solution
class Solution {
public int findFinalValue(int[] nums, int original) {
for(int i=0; i<nums.length; i++){
if(nums[i]==original){
return findFinalValue(nums, 2*original);
}
}
return original;
}
}
👍1