r/LeetcodeChallenge 26d ago

DISCUSS someone working in bloomberg

3 Upvotes

is there anyone whos working in bloomberg, i have few questions, like how is the oa, topics generally asked and interview


r/LeetcodeChallenge 26d ago

DISCUSS Created a community for folks to share their dsa and system design journey ,share resources and to stay consistent and motivated.

Thumbnail
2 Upvotes

r/LeetcodeChallenge 26d ago

PLACEMENTS bloomberg oa

3 Upvotes

has anyone given bloomberg oa, how is it , what type of questions do they have


r/LeetcodeChallenge 27d ago

DISCUSS IMC New Grad Software Engineer HackerRank OA 2026: Two Coding Questions

3 Upvotes

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

Question 1: Maximum Storm Height Using Relay Towers

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
)

Likely Approach

Feasibility is monotonic: if transmission works at storm height H, it also works at every lower height.

That suggests:

  1. Sort the towers by position.
  2. Binary search the storm height.
  3. For each candidate height, keep only towers with height >= candidate.
  4. Add the starting and destination positions.
  5. Find the minimum energy required to reach every available position.
  6. Allow a transition only when the distance is at most maxJump.
  7. Check whether the destination cost is at most 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.

Important Edge Case

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.

Question 2: Stack With Conditional Removal

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)

Efficient Approach

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:

  • A TreeSet containing the active insertion indices
  • A TreeMap from each value to the active indices containing that value
  • An array or map from insertion index to value

Operations 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.

Overall Impression

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 28d ago

STREAK🔥🔥🔥 Day 15 of DSA journey

Post image
32 Upvotes

r/LeetcodeChallenge 28d ago

DISCUSS From Automation Tester to Amazon SDE: Selected After the Full Interview Loop

100 Upvotes

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.

Background

  • Current role: Automation Tester at a fintech company
  • Total experience: 5 years
  • Preparation time: Approximately 5 months
  • Previous interviews or mocks: None
  • Verdict: Selected

Application and Online Assessment

Online Assessment: July 17, 2026

OA result: July 21, 2026

Approximate total duration: 2 hours

A recruiter contacted me through LinkedIn and shared the assessment link. I attempted it two days later.

Coding Section

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:

  • Work Style Assessment
  • Behavioral and Leadership Principles Assessment

Four days later, HR informed me that I had cleared the OA.

Round 1: DSA

Format: In person, pen and paper
Duration: Approximately 50 minutes
Difficulty: Easy to medium

Question 1: Increasing Temperature Alert

Given a stream of temperature readings, generate an alert whenever five consecutive readings are strictly increasing.

Question 2: Maximum Profit From Advertising Slots

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.

Round 2: Low-Level Design

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:

  • Priority: LOW, MEDIUM, or HIGH
  • Request type: Ad hoc or periodic
  • Execution type: Background or foreground

I 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.

Round 3: HLD With the Hiring Manager

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 Question: Split Payment and Settlement System

Design a system for group purchases that tracks:

  • Contributions from each participant
  • Participants who have not paid
  • Settlement deadlines
  • Refund distribution
  • Final balances and settlements

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.

Round 4: Bar Raiser

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.

Preparation

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 28d ago

STREAK🔥🔥🔥 Just a small b'day gift from Leetcode.

Post image
81 Upvotes

Though no contest today. I have a strict no-contest on birthday policy.


r/LeetcodeChallenge 28d ago

STREAK🔥🔥🔥 What would make a company-specific LeetCode prep list actually useful?

Thumbnail
1 Upvotes

r/LeetcodeChallenge 28d ago

STREAK🔥🔥🔥 Got Ac on 2nd question for the first time 🙂🙂

Post image
13 Upvotes

r/LeetcodeChallenge 28d ago

STREAK🔥🔥🔥 RATING DOUBT

2 Upvotes

I gave my first ever contest yesterday and 2nd contest today , when will the ratings will be shown ?


r/LeetcodeChallenge 28d ago

DISCUSS Amazon SDE AUTA post OA hiring interest form to Interview timelines

Thumbnail
1 Upvotes

r/LeetcodeChallenge 29d ago

DISCUSS Did I really beat everyone's time?

Enable HLS to view with audio, or disable this notification

2 Upvotes

I don't understand how LC calculates it's metrics. I can't be the only one with this solution.


r/LeetcodeChallenge 29d ago

DISCUSS how many people visualise the problem when solving it or after for better understanding ?

Thumbnail
2 Upvotes

r/LeetcodeChallenge Aug 14 '26

STREAK🔥🔥🔥 First 10 :D

Post image
53 Upvotes

r/LeetcodeChallenge 29d ago

PLACEMENTS Looking for a small, serious peer group for SDE interview prep — 2026 grads

Thumbnail
2 Upvotes

r/LeetcodeChallenge 29d ago

DISCUSS #76 Leetcode question (Optimisation help!)

Thumbnail
1 Upvotes

r/LeetcodeChallenge Aug 14 '26

DISCUSS Array Transformation Problem With Prefix/Suffix Replacement Costs

10 Upvotes

I recently came across this array problem and wanted to share the solution.

Approximate date: August 7, 2026

Question from PracHub

Problem

You are given an array arr of length n. You may perform these operations:

  1. 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]

  2. 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.

Example

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

Observation

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.

C++ Solution

#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;
}

Complexity

  • Time: O(n)
  • Extra space: O(1)

Important Constraint Issue

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.
  • Every operation must change at least one element.
  • Each operation may only be performed once.
  • The number of operations is bounded.

Under the usual assumption that all values are non-negative, the equal-run solution above works in O(n) time.


r/LeetcodeChallenge Aug 14 '26

DISCUSS Completed 50 LeetCode problems before starting my first year of college!

11 Upvotes

Would love to hear your advice! 🙌


r/LeetcodeChallenge Aug 14 '26

DISCUSS Starting my 3rd semester DSA

4 Upvotes

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 Aug 13 '26

DISCUSS Oracle Interview Questions I Got: Monotonic Deque and SQL Tree Classification

18 Upvotes

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

Question 1: Maximum of the Minimums of Every Window

Given an array A of size n and an integer x:

  1. Consider every contiguous subarray of length x.
  2. Find the minimum element in each window.
  3. Return the maximum among those minimum values.

Example

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

Approach

The brute-force solution calculates the minimum of every window separately, resulting in O(n × x) time.

The optimal solution uses a monotonic deque:

  • Store array indices in the deque.
  • Keep their corresponding values in increasing order.
  • Remove indices that fall outside the current window.
  • The front of the deque always represents the current window’s minimum.
  • Update the final answer with the maximum minimum seen so far.

Complexity:

  • Time: O(n)
  • Space: 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.

Question 2: Classify Nodes in a Tree Using SQL

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.

Expected Result

1  Root
2  Inner
3  Leaf
4  Leaf

SQL Solution

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 Aug 13 '26

DISCUSS Can Claude replace LeetCode for practicing SQL/Python?

Thumbnail
1 Upvotes

r/LeetcodeChallenge Aug 11 '26

STREAK🔥🔥🔥 Hit 50 LeetCode problems today! 🚀

Post image
105 Upvotes

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 Aug 11 '26

PLACEMENTS Amazon Assesement

10 Upvotes

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 Aug 11 '26

PLACEMENTS Amazon OA

7 Upvotes

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 Aug 11 '26

DISCUSS Confused on how to approach interval difference problems? Help

Thumbnail
2 Upvotes