1.06K subscribers
2 photos
2 files
4 links
Download Telegram
Channel name was changed to ยซPlacement Mateยป
Deltax tomorrow Online MCQ round is scheduled at 10AM. PDF of solution that will asked in the OA will be posted here before 9 AM. All the questions will be same from the pdf order of questions may change. All the best :)
๐Ÿ‘3๐Ÿฅฐ1
IMG-20230823-WA0054.jpg
113 KB
Coding question
๐Ÿ‘8๐Ÿ‘Ž1
Please let me know,all questions are came from this pdf or not??
Anonymous Poll
52%
Yes
13%
No
35%
Some came out of pdf
๐Ÿ‘24๐Ÿ‘2โค1
Messages in this channel will be automatically deleted after 1 day
Messages in this channel will no longer be automatically deleted
Will update the deltaX pdf in the morning at 8 am.
Stay updated in the group
๐Ÿ‘3โค2
๐Ÿ‘21
DeltaX pinned Deleted message
https://youtu.be/cseyBVfuO8o?si=4n6IJNGuUs7XqP60

If u can please subscribe this channel then I will update more such ongoing placement related questions.
โค11๐Ÿ‘2๐Ÿ”ฅ1๐Ÿ‘1
Channel name was changed to ยซDeltaXยป
DeltaX pinned a file
๐Ÿ‘6โค5๐Ÿ”ฅ1
DeltaX
Photo
import java.util.*;

public class Main {
public static boolean canPlace(int[] A, int N, int K, int mid) {
int count = 1;
int prev = A[0];

for (int i = 1; i < N; i++) {
if (A[i] - prev >= mid) {
count++;
prev = A[i];
}
}

return count >= K;
}

public static int largestMinDistance(int[] A, int N, int K) {
Arrays.sort(A);
int low = 1;
int high = A[N - 1] - A[0];

while (low <= high) {
int mid = low + (high - low) / 2;

if (canPlace(A, N, K, mid)) {
low = mid + 1;
} else {
high = mid - 1;
}
}

return high;
}

public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();
int K = scanner.nextInt();
int[] A = new int[N];

for (int i = 0; i < N; i++) {
A[i] = scanner.nextInt();
}

int result = largestMinDistance(A, N, K);
System.out.println(result);
}
}
๐Ÿ‘16โค7๐Ÿฅฐ3๐Ÿ‘Ž2๐Ÿ‘2๐Ÿ”ฅ1๐Ÿ˜1
DeltaX pinned a file
import java.util.Arrays;
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();
int M = scanner.nextInt();
int[] A = new int[N];

for (int i = 0; i < N; i++) {
A[i] = scanner.nextInt();
}

Arrays.sort(A);

int minFunctionValue = Integer.MAX_VALUE;
for (int i = 0; i <= N - M; i++) {
int currentFunctionValue = A[i + M - 1] - A[i];
if (currentFunctionValue < minFunctionValue) {
minFunctionValue = currentFunctionValue;
}
}

System.out.println(minFunctionValue);
}
}
๐Ÿ‘34โค3
Channel name was changed to ยซAccenture PADAยป
Channel name was changed to ยซDeltaXยป