COGNIZANT EXAM HELP GROUP
3.55K subscribers
5.3K photos
21 videos
10 files
3.22K links
πŸš€ Placement Preparation Hub

πŸŽ“ From Preparation to Placement

⚑ OA Support β€’ Coding β€’ Aptitude β€’ Technical β€’ HR

🌟 Trusted by Hundreds of Students

πŸ† 372+ Placement Successes βœ…

πŸ“© DM: @Mrtrueliving_ix

πŸ’™ Turning Aspirations into Offer Letters.
Download Telegram
βœ… HighRadius Hiring Tournament – VERY IMPORTANT DETAILS

πŸ“… Date: Today, Aug 06 (Tuesday)
πŸ•˜ Time: 9:00 PM – 10:30 PM (90 minutes)
πŸ“© Contest Link: Will be sent via WhatsApp DMs at 8:00 PM to your registered number.
πŸ”— Test Link:
πŸ‘‰ https://thejoboverflow.com/assessment/highradius-java-oa/

🚨 Instructions:

Sign in to the platform as soon as you receive the link!

Create your profile early to avoid last-minute issues.

Late sign-in = lost time ⏱️


🧠 Duration: 90 Minutes
πŸ’» Platform: JobOverflow
πŸ“² Tip: Be online by 7:50 PM to receive the link and onboard quickly.

🎯 Good luck! Give your best shot!
import java.io.*;
import java.util.*;

public class Main {
public static void main(String[] A) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
int[] a = new int[n], l = new int[n], r = new int[n];
StringTokenizer st = new StringTokenizer(br.readLine());
for (int i = 0; i < n; i++) a[i] = Integer.parseInt(st.nextToken());

Deque<Integer> d = new ArrayDeque<>();
for (int i = 0; i < n; i++) {
while (!d.isEmpty() && a[d.peek()] <= a[i]) d.pop();
l[i] = d.isEmpty() ? -1 : d.peek();
d.push(i);
}

d.clear();
for (int i = n - 1; i >= 0; i--) {
while (!d.isEmpty() && a[d.peek()] < a[i]) d.pop();
r[i] = d.isEmpty() ? n : d.peek();
d.push(i);
}

long res = 0;
for (int i = 0; i < n; i++) res += (long) a[i] * (i - l[i]) * (r[i] - i);

d.clear();
for (int i = 0; i < n; i++) {
while (!d.isEmpty() && a[d.peek()] >= a[i]) d.pop();
l[i] = d.isEmpty() ? -1 : d.peek();
d.push(i);
}

d.clear();
for (int i = n - 1; i >= 0; i--) {
while (!d.isEmpty() && a[d.peek()] > a[i]) d.pop();
r[i] = d.isEmpty() ? n : d.peek();
d.push(i);
}

for (int i = 0; i < n; i++) res -= (long) a[i] * (i - l[i]) * (r[i] - i);

System.out.print(res);
}
}

Unfair multiverse πŸ‘ // high radius πŸ‘
❀2
import java.io.*;
import java.util.*;

class Node {
String k;
long v;
Node n;

public Node(String k, long v) {
this.k = k;
this.v = v;
this.n = null;
}
}

class HashMap { // Removed 'public' modifier
private Node[] b;
private int c;
private int s;
private static final int INIT = 16;
private static final float LF = 0.75f;
private static final int P = 31;

public HashMap() {
this.c = INIT;
this.b = new Node[c];
this.s = 0;
}

private int h(String k) {
int h = 0;
for (int i = 0; i < k.length(); i++) {
h = (h * P + k.charAt(i)) & Integer.MAX_VALUE;
}
return h & (c - 1);
}

public void put(String k, long v) {
int i = h(k);
Node n = b[i];

while (n != null) {
if (n.k.equals(k)) {
n.v = v;
return;
}
n = n.n;
}

Node nn = new Node(k, v);
nn.n = b[i];
b[i] = nn;
s++;

if ((float)s / c > LF) {
resize();
}
}

private void resize() {
int nc = c * 2;
Node[] nb = new Node[nc];

for (int i = 0; i < c; i++) {
Node n = b[i];
while (n != null) {
Node next = n.n;
int ni = (h(n.k) * nc / c) & (nc - 1);
n.n = nb[ni];
nb[ni] = n;
n = next;
}
}

b = nb;
c = nc;
}

public Long get(String k) {
int i = h(k);
Node n = b[i];

while (n != null) {
if (n.k.equals(k)) {
return n.v;
}
n = n.n;
}

return null;
}

public Long remove(String k) {
int i = h(k);
Node n = b[i];
Node p = null;

while (n != null) {
if (n.k.equals(k)) {
if (p != null) {
p.n = n.n;
} else {
b[i] = n.n;
}
s--;
return n.v;
}
p = n;
n = n.n;
}

return null;
}

public static void main(String[] args) throws IOException {
HashMap m = new HashMap();
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int Q = Integer.parseInt(br.readLine());

for (int i = 0; i < Q; i++) {
String[] p = br.readLine().split(" ");
String op = p[0];

switch (op) {
case "PUT":
String k = p[1];
long v = Long.parseLong(p[2]);
m.put(k, v);
break;
case "GET":
k = p[1];
Long r = m.get(k);
System.out.println(r != null ? r : "null");
break;
case "REMOVE":
k = p[1];
Long rm = m.remove(k);
System.out.println(rm != null ? rm : "null");
break;
}
}
}
}
HighRadius Help done βœ…

Test accomplished ❀️ || Offcampus

DM for any placement Help πŸ™‚

@Mrtrueliving_ix βœ“ @Mrtrueliving_ix βœ“
❀1
Amex Slots are available ❀️

@Mrtrueliving_ix βœ“
Infosys interview help Available 🎯...

DM for test clearance πŸ’―

Prev proof

https://t.me/code_alphix/7289?single

No doubt for selection 😎


https://t.me/code_alphix/7408

https://t.me/code_alphix/7530
🚨 Uber is Hiring – Software Engineer I (SDE I) 🚨
Perfect for fresh graduates or those with up to 1 year of experience!

If you’re passionate about coding and ready to launch your career in tech, this could be your golden ticket! 🌟

πŸ“ Location: Bangalore
πŸŽ“ Eligible Batches: 2024 & 2025
πŸ’Ό Role: Software Engineer I (SDE I)

πŸ—“ Application Deadline: 8th August 2025, 12:00 PM IST
πŸ—“ Referral Deadline: 7th August 2025, 11:00 PM IST

πŸ”— Direct Apply Link:
πŸ‘‰ https://lnkd.in/gphDKGHF

πŸ”— Referral Form (Optional):
πŸ‘‰ https://lnkd.in/guaSRB_K
Given an array A of length N, you need to create a new array B by removing exactly 2N/3 elements from A without changing the order.
The score is defined as:
Score = (The sum of the elements in the first half of B) - (The sum of the elements in the second half of B)
Your task is to find the maximum possible score.
Note:
It is guaranteed that N is divisible by 3.
Any element from A can be removed such that the score is maximized.
Input Format:
The first line contains an integer N, denoting the number of elements in A.
Each of the N subsequent lines contains an integer describing A[i].
Constraints:
1 <= N <= 10^5
1 <= A[i] <= 10^9
Sample Test Cases:
Case 1:

Input
3
1
2
3

Output
1

Infosys // interview Q's πŸ‘


Adding more Q's stay tuned

https://t.me/code_alphix

Refer your friends too ❀️
Hcl Slots are available...

@Mrtrueliving_ix
Upcoming infosys interview Slots are available



DM
@Mrtrueliving_ix βœ“
❀1
Wipro slots are available...

DM For test Clearance ❀️

@Mrtrueliving_ix @Mrtrueliving_ix

Up to onboarding Process available

OA + interview+ milestone βœ“


https://t.me/code_alphix/7452?single
❀4
All Placement Exam's help available

@Mrtrueliving_ix βœ“
❀1
All Placement Exam's help available

@Mrtrueliving_ix βœ“

Test Clearance guarantee 😊 πŸ’―
Amazon SDE Intern all codes available

@Mrtrueliving_ix βœ“
Amazon SDE Help done βœ…

DM for any placement Help ☺️

@Mrtrueliving_ix @Mrtrueliving_ix

#Amazon #SDE #Offcampus
❀1
Amazon SDE Help done βœ…

DM for any placement Help ☺️

@Mrtrueliving_ix @Mrtrueliving_ix

#Amazon #SDE #Offcampus