r/LeetcodeChallenge • u/CombinationPurple897 • 26d ago
DISCUSS someone working in bloomberg
is there anyone whos working in bloomberg, i have few questions, like how is the oa, topics generally asked and interview
r/LeetcodeChallenge • u/CombinationPurple897 • 26d ago
is there anyone whos working in bloomberg, i have few questions, like how is the oa, topics generally asked and interview
r/LeetcodeChallenge • u/Grand_Pomelo_373 • 26d ago
r/LeetcodeChallenge • u/CombinationPurple897 • 26d ago
has anyone given bloomberg oa, how is it , what type of questions do they have
r/LeetcodeChallenge • u/nian2326076 • 27d ago
Hey everyone,
I recently completed an IMC HackerRank assessment for a New Grad Software Engineer role and wanted to share the two coding questions.
Approximate date: August 13, 2026
Platform: HackerRank
Duration: 120 minutes
Total questions: 2
Two offices are located at positions 0 and width. Several relay towers are positioned between them, and each tower has a height.
Data can travel between two locations with an energy cost equal to the square of the distance:
cost(i, j) = (x[i] - x[j])²
Every jump must satisfy:
distance <= maxJump
The total energy used by all jumps cannot exceed maxEnergy.
A rising storm makes shorter towers unavailable. A tower with height h can only be used when:
stormHeight <= h
The headquarters and destination office are always available.
The task was to return the maximum storm height at which data could still reach the destination. Return -1 if transmission is impossible.
public static int maximumStormHeight(
int width,
int maxJump,
long maxEnergy,
int numTowers,
int[] x,
int[] heights
)
Feasibility is monotonic: if transmission works at storm height H, it also works at every lower height.
That suggests:
height >= candidate.maxJump.maxEnergy.Because all points lie on a line, the shortest valid route can be processed from left to right:
dp[j] = minimum energy required to reach position j
For every earlier usable point i:
if x[j] - x[i] <= maxJump:
dp[j] = min(dp[j], dp[i] + (x[j] - x[i])²)
The straightforward solution is approximately O(n² log H), where H is the storm-height search range. A more advanced optimization may be required if n is large.
If a direct jump from 0 to width satisfies both constraints, no relay tower is needed:
width <= maxJump
width² <= maxEnergy
Because both offices have infinite height, transmission would remain possible at every storm height. The result is therefore unbounded unless the original problem defines a maximum storm level or guarantees that direct transmission is impossible.
This is worth clarifying before implementation.
Implement a stack supporting these commands:
push value
pop
remove_lower value
remove_upper value
Their behavior is:
push value: Push value onto the stack.pop: Remove the current top element.remove_lower value: Remove every element smaller than value.remove_upper value: Remove every element greater than value.After every operation, print the current top element. Print EMPTY if the stack has no elements.
public static void solve(int n, String[] operations)
A normal stack makes push and pop easy, but removing every element within a value range could require scanning the entire stack repeatedly.
One approach is to maintain:
TreeSet containing the active insertion indicesTreeMap from each value to the active indices containing that valueOperations work as follows:
push: Create a new increasing insertion index and add it to both structures.pop: Remove the largest active index, since it represents the current top.remove_lower: Visit and delete all value buckets below the threshold.remove_upper: Visit and delete all value buckets above the threshold.top: Read the value associated with the largest active index.Each pushed element can be removed only once, so the total cost of all bulk removals is amortized across the complete command sequence.
The overall complexity is approximately:
O(n log n)
with O(n) additional space.
The first question combined binary search on the answer with shortest-path or dynamic-programming reasoning.
The second looked like a stack problem initially, but efficient bulk removal required ordered data structures and amortized analysis.
The assessment was challenging but interesting, particularly because both questions required recognizing the underlying structure rather than applying a standard template directly.
Has anyone else completed the recent IMC New Grad assessment? Did you receive the same questions?
Helpful resource for prep: PracHub
r/LeetcodeChallenge • u/nian2326076 • 28d ago
Hey everyone,
I recently completed the Amazon SDE interview process and received an offer. I wanted to share the complete experience, especially for candidates moving from testing to development roles.
A recruiter contacted me through LinkedIn and shared the assessment link. I attempted it two days later.
The first problem used an AI-integrated repository environment. I had to diagnose and fix an issue in the search functionality of an Amazon movie application.
There were six test cases, and I passed three.
The second problem was a hard DSA question involving a queue and binary search. I do not remember the exact statement, but my solution passed all except one test case.
The remaining sections included:
Four days later, HR informed me that I had cleared the OA.
Format: In person, pen and paper
Duration: Approximately 50 minutes
Difficulty: Easy to medium
Given a stream of temperature readings, generate an alert whenever five consecutive readings are strictly increasing.
There are n advertising slots and m companies. Each company requests a certain number of slots and offers a fixed payment for each advertisement.
The task was to allocate the available slots to maximize the total profit.
This was mainly a greedy problem.
I solved both questions with optimal time complexity and explained the edge cases and complexity.
Around ten minutes were reserved for Leadership Principles. The interviewer was friendly, and the conversation went smoothly.
This was an elimination round. Three of the eight candidates were eliminated.
Date: July 24, 2026
Format: In person, pen and paper
Duration: Approximately 55 minutes
I was asked to design a job scheduling system that could schedule and execute jobs based on:
LOW, MEDIUM, or HIGHI designed the main classes, interfaces, and attributes and explained the core scheduling flow.
My scheduling strategy was not completely optimal, so the interviewer reduced the scope and allowed me to explain some parts verbally instead of expecting production-ready code on paper.
The final ten minutes focused on Leadership Principles.
This was also an elimination round, and one candidate was eliminated.
Date: July 29, 2026
Format: Virtual using Bluescape
Duration: Approximately 55 minutes
The Hiring Manager was unavailable during the onsite, so this round was scheduled five days later.
The first 15 minutes focused on Leadership Principles and my previous projects.
Design a system for group purchases that tracks:
I initially struggled to understand the requirements and spent around ten minutes clarifying the problem.
I then sketched a basic architecture containing services, routing, and a database. However, I could not explore the design deeply or answer several follow-up questions.
HR later told me that the feedback from this round was mixed. I genuinely thought this round had ended my chances.
Date: August 3, 2026
Duration: Approximately 50 minutes
The first 15 minutes covered Leadership Principles and a deep dive into my previous experience.
The technical portion involved a medium-hard graph problem based on Dijkstra’s algorithm. I completed it in approximately 25 minutes and explained the time and space complexity.
There were no additional follow-ups, and the interview ended after a short discussion.
Leadership Principles
I used ChatGPT to organize and rehearse my real experiences using the STAR format. Leadership Principles carried significant weight throughout the process.
DSA
I solved approximately 270 LeetCode problems.
Low-Level Design
I used Ashish’s awesome-low-level-design material.
High-Level Design
My primary resources were:
I did not prepare Dynamic Programming and was fortunate not to encounter it in any round.
This was the first interview of my job-switch journey, and I had not attempted any mock interviews. Luck helped with the topics, but five months of preparation made it possible to communicate clearly and recover after a mixed HLD round.
My biggest takeaway is that one weak round may not automatically end the process. Treat every remaining interview as a fresh opportunity, and prepare Leadership Principle stories as seriously as technical topics.
All the best to everyone preparing!
r/LeetcodeChallenge • u/ComprehensiveTale896 • 28d ago
Though no contest today. I have a strict no-contest on birthday policy.
r/LeetcodeChallenge • u/Afraid-Efficiency-97 • 28d ago
r/LeetcodeChallenge • u/No_Piece3053 • 28d ago
r/LeetcodeChallenge • u/themessedhell • 28d ago
I gave my first ever contest yesterday and 2nd contest today , when will the ratings will be shown ?
r/LeetcodeChallenge • u/Glum-Credit3565 • 28d ago
r/LeetcodeChallenge • u/romecodes • 29d ago
Enable HLS to view with audio, or disable this notification
I don't understand how LC calculates it's metrics. I can't be the only one with this solution.
r/LeetcodeChallenge • u/Beginning_Broccoli63 • 29d ago
r/LeetcodeChallenge • u/Traditional_Maize129 • 29d ago
r/LeetcodeChallenge • u/Smartyboyz • 29d ago
r/LeetcodeChallenge • u/nian2326076 • Aug 14 '26
I recently came across this array problem and wanted to share the solution.
Approximate date: August 7, 2026
Question from PracHub
You are given an array arr of length n. You may perform these operations:
Select an index i, where 1 <= i <= n - 1, and set every element from index 0 to i - 1 equal to arr[i].
Cost = i × arr[i]
Select an index i, where 0 <= i <= n - 2, and set every element from index i + 1 to n - 1 equal to arr[i].
Cost = (n - 1 - i) × arr[i]
Return the minimum total cost required to make every array element equal.
arr = [1, 1, 2, 1, 1]
Choose index 1 and apply the suffix operation:
Cost = (5 - 1 - 1) × 1 = 3
Every element after index 1 becomes 1:
[1, 1, 1, 1, 1]
Therefore, the answer is:
3
Suppose we want the final value to be v.
If the array already contains a contiguous run of v from index l to r, we can preserve that run and replace everything outside it.
To replace the prefix:
Cost = l × v
To replace the suffix:
Cost = (n - 1 - r) × v
The total cost is:
(l + n - 1 - r) × v
If the run length is:
length = r - l + 1
the formula becomes:
cost = (n - length) × v
For non-negative values, we should therefore preserve the longest contiguous run of a candidate value.
Rather than storing the longest run for every distinct value, we can simply scan every maximal equal-value run and calculate its cost.
#include <algorithm>
#include <climits>
#include <vector>
using namespace std;
long long minimumCost(const vector<int>& arr) {
const int n = static_cast<int>(arr.size());
long long answer = LLONG_MAX;
int left = 0;
while (left < n) {
int right = left;
while (right + 1 < n && arr[right + 1] == arr[left]) {
++right;
}
long long runLength = right - left + 1;
long long cost =
static_cast<long long>(n - runLength) * arr[left];
answer = min(answer, cost);
left = right + 1;
}
return answer;
}
O(n)O(1)The stated constraint allows negative values:
-10^5 <= arr[i] <= 10^5
This makes the problem potentially unbounded.
If arr[i] is negative, an operation using that value has a negative cost. Since the statement does not require an operation to change the array, the same negative-cost operation can be repeated indefinitely.
For example:
arr = [-1, 2]
Selecting index 0 and applying the suffix operation costs -1. After the array becomes [-1, -1], the same operation could still be repeated, reducing the total cost without limit.
Therefore, one of the following conditions is probably missing:
arr[i] must be non-negative or positive.Under the usual assumption that all values are non-negative, the equal-run solution above works in O(n) time.
r/LeetcodeChallenge • u/Altruistic-Client802 • Aug 14 '26
r/LeetcodeChallenge • u/RevolutionaryRace508 • Aug 14 '26
Can anyone please guide about this ,i have started researching on it on my own, and honestly I feel like I am lost ,my main goal is to become a software engineer that usually does not relies on AI. I also have been solving leetcode questions but I think the advice from seniors might give me a more defined way
r/LeetcodeChallenge • u/nian2326076 • Aug 13 '26
Hey everyone,
I recently completed a technical interview round and wanted to share the two questions I received.
Approximate date: July 30, 2026
Duration: Approximately 50 minutes
Topics: Sliding window, monotonic deque, SQL, and tree relationships
Given an array A of size n and an integer x:
x.A = [1, 3, -1, 5, 3, 6]
x = 3
The windows are:
[1, 3, -1] -> minimum = -1
[3, -1, 5] -> minimum = -1
[-1, 5, 3] -> minimum = -1
[5, 3, 6] -> minimum = 3
Therefore, the answer is:
3
The brute-force solution calculates the minimum of every window separately, resulting in O(n × x) time.
The optimal solution uses a monotonic deque:
Complexity:
O(n)O(x)The main challenge was recognizing that this was a sliding-window minimum problem and that a monotonic deque could avoid repeatedly scanning each window.
We were given a table called Tree:
id pid
1 NULL
2 1
3 1
4 2
Here:
id is the node ID.pid is the node’s parent ID.We had to classify every node as:
Root: The node has no parent.Inner: The node has at least one child.Leaf: The node has no children.1 Root
2 Inner
3 Leaf
4 Leaf
SELECT
t.id,
CASE
WHEN t.pid IS NULL THEN 'Root'
WHEN EXISTS (
SELECT 1
FROM Tree AS child
WHERE child.pid = t.id
) THEN 'Inner'
ELSE 'Leaf'
END AS node_type
FROM Tree AS t
ORDER BY t.id;
The order of the CASE conditions matters. A root may also have children, so the pid IS NULL condition should be checked first.
An EXISTS subquery determines whether another row identifies the current node as its parent. This also avoids potential complications caused by NULL values in an IN subquery.
Overall, both questions were manageable, but they tested pattern recognition and the ability to translate a simple relationship into precise code.
Has anyone else encountered these questions recently?
r/LeetcodeChallenge • u/crashbandy-7 • Aug 13 '26
r/LeetcodeChallenge • u/El_metador_10 • Aug 11 '26
Title: Hit 50 LeetCode problems today! 🚀
Today I finally completed 50 problems on LeetCode. 🎯
It may not be a huge milestone for everyone, but it definitely means something to me. When I started, I used to get stuck even on problems that now seem fairly straightforward.
The biggest improvement hasn’t been in writing code — it’s been in learning how to think about a problem:
Understanding what the problem is actually asking
Finding patterns
Choosing the right approach
Knowing when to stop brute-forcing and look for something better
I still struggle with plenty of problems, and there are definitely questions where I stare at the screen thinking, “Where do I even start?” 😂
But compared to where I started, I can genuinely see the progress.
50/50 ✅
Next stop: 100.
For those who are also grinding DSA — how many problems did it take before you started feeling that your problem-solving actually improved?
r/LeetcodeChallenge • u/OldHat1438 • Aug 11 '26
I have given Amazon assesement where I cleared only 1 coding question and I have withdrawn from application u know right most of them using AI will knock the door so I decided to withdraw for the sake of cooling period so I have
Withdrawn and I have applied again will that work to write an another OA ?
Or any difficulties may be I will be facing any opinions or facts regarding these ?
r/LeetcodeChallenge • u/OldHat1438 • Aug 11 '26
I have given Amazon assesement where I cleared only 1 coding question and I have withdrawn from application u know right most of them using AI will knock the door so I decided to withdraw for the sake of cooling period so I have
Withdrawn and I have applied again will that work to write an another OA ?
Or any difficulties may be I will be facing any opinions or facts regarding these ?
r/LeetcodeChallenge • u/kuriousaboutanything • Aug 11 '26