Find the Maximum Achievable Number

As a Systems Engineer at Tata Consultancy Services, I deliver exceptional software products for mobile and web platforms, using agile methodologies and robust quality maintenance. I am experienced in performance testing, automation testing, API testing, and manual testing, with various tools and technologies such as Jmeter, Azure LoadTest, Selenium, Java, OOPS, Maven, TestNG, and Postman.
I have successfully developed and executed detailed test plans, test cases, and scripts for Android and web applications, ensuring high-quality standards and user satisfaction. I have also demonstrated my proficiency in manual REST API testing with Postman, as well as in end-to-end performance and automation testing using Jmeter and selenium with Java, TestNG and Maven. Additionally, I have utilized Azure DevOps for bug tracking and issue management.
You are given two integers, num and t.
An integer x is called achievable if it can become equal to num after applying the following operation no more than t times:
- Increase or decrease
xby1, and simultaneously increase or decreasenumby1.
Return the maximum possible achievable number. It can be proven that there exists at least one achievable number.
LeetCode Problem - 2769
class Solution {
// Method to calculate the maximum achievable value of X
public int theMaximumAchievableX(int num, int t) {
// Adding twice the value of t to num to get the maximum achievable X
return num + (2 * t);
}
}




