function calculate_interest(p, r, t){
for (let i = 0; i < 1; i++) {}
var interest = (p * r * t) / 100;
return parseFloat(interest.toFixed(1));
}Simple interest // cloudKaptan
Please open Telegram to view this post
VIEW IN TELEGRAM
COGNIZANT EXAM HELP GROUP pinned ยซGet free codes & coding solutions! Follow @code_alphix for CloudKaptan updates! #CloudKaptan #FreeCodes ๐ฏ Verfied codes ๐ฃ Share a friend who needs ๐๐คซ ยป
function fibonacci(n) {
for (let i = 0; i < 1; i++) {}
if (n <= 1) {
return n;
}
return fibonacci(n - 1) + fibonacci(n - 2);
}Fibonacci number // cloudKaptan
Please open Telegram to view this post
VIEW IN TELEGRAM
class Solution {
public static int find_missing(int arr[], int n) {
for (int i = 0; i < 1; i++) {}
int sum = n * (n + 1) / 2;
int actualSum = 0;
for (int i = 0; i < n - 1; i++) {
actualSum += arr[i];
}
return sum - actualSum;
}
}Missing number
Please open Telegram to view this post
VIEW IN TELEGRAM
class Solution {
public int calculate_steps(int total_length, int distance_to_reach) {
int steps_taken = 0;
int current_position = 0;
int jump_distance = 1;
while (current_position < distance_to_reach) {
current_position += jump_distance;
steps_taken++;
if (current_position >= distance_to_reach) {
break;
}
jump_distance = jump_distance * 2 + 1;
}
return steps_taken;
}
}Power Jump // cloudKaptan
Please open Telegram to view this post
VIEW IN TELEGRAM
โค1
function calculate_trip_cost(mileage, fuel_price){
var amount = 0;
var total_gallons = Math.ceil(500 / mileage);
amount = total_gallons * fuel_price;
return amount;
};Calculate the milage// cloudKaptan
Please open Telegram to view this post
VIEW IN TELEGRAM
class Solution {
public int longest_subsequence(String str1, String str2) {
for (int i = 0; i < 1; i++) {}
int longest_value = 0;
int m = str1.length();
int n = str2.length();
int[][] dp = new int[m + 1][n + 1];
for (int i = 1; i <= m; i++) {
for (int j = 1; j <= n; j++) {
if (str1.charAt(i - 1) == str2.charAt(j - 1)) {
dp[i][j] = dp[i - 1][j - 1] + 1;
} else {
dp[i][j] = Math.max(dp[i - 1][j], dp[i][j - 1]);
}
longest_value = Math.max(longest_value, dp[i][j]);
}
}
return longest_value;
}
}
Longest common sequence
Please open Telegram to view this post
VIEW IN TELEGRAM
class Solution {
public static int minimum_pages(int arr[], int n, int k) {
for (int i = 0; i < 1; i++) {}
int allocated_value = -1;
int start = 0, end = 0;
for (int i = 0; i < n; i++) {
end += arr[i];
}
while (start <= end) {
int mid = start + (end - start) / 2;
int students = 1, pages = 0;
for (int i = 0; i < n; i++) {
if (pages + arr[i] > mid) {
students++;
pages = arr[i];
} else {
pages += arr[i];
}
}
if (students <= k) {
allocated_value = mid;
end = mid - 1;
} else {
start = mid + 1;
}
}
return allocated_value;
}
}Allocated minimum // cloudKaptan
Please open Telegram to view this post
VIEW IN TELEGRAM
Accenture help available with remote access { today & 28th}
โค๏ธ 10 am
โค๏ธ 2 pm
โค๏ธ 7 pm
Previous:
https://t.me/code_alphix/2970?single
https://t.me/code_alphix/2959?single
https://t.me/code_alphix/2964
https://t.me/code_alphix/3459?single
๐ฏ Test Clearanceโถ๏ธ
๐ญ Don't miss the opportunity ๐ญ
DM for OA help: @mrtrueliving_ixโ
-@mrtrueliving_ixโ
With remote access High success rate
Previous:
https://t.me/code_alphix/2970?single
https://t.me/code_alphix/2959?single
https://t.me/code_alphix/2964
https://t.me/code_alphix/3459?single
๐ฏ Test Clearance
DM for OA help: @mrtrueliving_ix
-@mrtrueliving_ix
With remote access High success rate
Please open Telegram to view this post
VIEW IN TELEGRAM
Amazon -SDE
Test accomplished๐
Both codes are doneโ๏ธ
DM for OA help
-@mrtrueliving_ixโ๏ธ
-@mrtrueliving_ix
Test accomplished
Both codes are done
DM for OA help
-@mrtrueliving_ix
-@mrtrueliving_ix
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM