10 March 2023
Qualys is Hiring
Role: Software Engineer
Qualification: BE/BTech/ME/MTech/MCA
Experience: Fresher's to 3 years of exp.
Job Location: Pune
Apply Link: https://careerits.blogspot.com/p/latest-offcampus-2022.html
Join @coodingtree on telegram for off campus updates 🔥🔥
1.7K · 11 March 2023
12 March 2023
Tata Steel Exam Oops Section
Q1 -D
https://t.me/CoodingTree
public class Main {
public static void main(String[] args) {
int maxPearls = 1;
int startMagnificence = 4;
int endMagnificence = 5;
int count = countNecklaces(maxPearls, startMagnificence, endMagnificence);
System.out.println(count);
}
public static int countNecklaces(int maxPearls, int startMagnificence, int endMagnificence) {
int count = 0;
for (int pearls = 1; pearls <= maxPearls; pearls++) {
for (int magnificence = startMagnificence; magnificence <= endMagnificence; magnificence++) {
if (pearls == 1) {
count++;
} else {
int prevCount = count;
for (int prevMagnificence = startMagnificence; prevMagnificence <= magnificence; prevMagnificence++) {
count += prevCount;
}
}
}
}
return count;
}
}
15 March 2023
17 March 2023
18 March 2023
21 March 2023