Microsoft SDE Intern Interview Experience
💼 LTIMindtree Interview Experience (On-Campus) | Fresher | 2026
Salesforce SMTS | Interview Experience | Rejected
JPMC | SDE2 (Associate) - Java Backend - Interview Experience + Compensation
Microsoft - SDE2 - Coding Round
Cashfree Frontend Intern Online assessment
Summary
I participated in Cashfree's Frontend Intern online assessment in mid-June, which included general knowledge questions and three coding problems, and I was selected for the interview round.
Full Experience
I had Participated in Cashfree Frontend Intern on mid of june had my OA scheduled and was asked 5 on Error codes , linkedList ,user experience and graph later I had 3 question 2 dsa question and 1 node.js (javascript Q). verdict selected for interview
Interview Questions (3)
Problem: Distinct One Counts After One Flip
You are given a binary array arr of length n, consisting only of 0s and 1s.
You are allowed to choose exactly one subarray (possibly empty) and flip all of its elements — that is, convert all 0s in the subarray to 1s, and all 1s to 0s.
Your task is to determine how many distinct values for the total number of 1s in the array can be obtained after performing exactly one flip operation.
Function Signature
int getDistinctOneCounts(vector<int> arr);
Input
arr: A vector ofnintegers, where each element is either0or1.- Constraints:
- $1 \leq n \leq 2 \times 10^5$
- Each element of
arris either0or 1.
Output
- Return an integer representing the number of distinct possible counts of 1s in the array after exactly one subarray flip operation.
Note
- A subarray is a contiguous portion of the array.
- You are allowed to flip an empty subarray, which results in no change to the array.
Example
Input
arr = [0, 1, 1, 0]
Output
4
Explanation
Possible flips and resulting 1-counts:
| Subarray Chosen (0-based indices) | Flipped Array | Number of 1s |
|---|---|---|
| None (empty subarray) | [0, 1, 1, 0] | 2 |
| [0, 0] | [1, 1, 1, 0] | 3 |
| [1, 2] | [0, 0, 1, 0] | 1 |
| [0, 3] | [1, 0, 0, 1] | 2 |
| [0, 1] | [1, 0, 1, 0] | 2 |
| [2, 3] | [0, 1, 0, 1] | 2 |
| [1, 3] | [0, 0, 0, 1] | 1 |
| [0, 2] | [1, 0, 0, 0] | 1 |
| [1, 2] | [0, 0, 0, 0] | 0 |
The distinct counts of 1s after these flips are: {0, 1, 2, 3} → total 4 distinct values.
Problem: Custom Auction System
You are building a custom auction system with unique bidding rules:
- An auction starts with an initial price.
- Bidders can place bids via
updatePrice, but only if their bid is higher than the current bid. - To win the item, a bidder must explicitly claim it using
callBidwith a valid offer. - Once an item is claimed via a successful
callBid, no further bids or claims are allowed on it.
Function Definitions
You need to implement the following three functions to manage the auction process:
1 startAuction(auctions, entity, startingPrice)
Starts an auction for a given item.
- Parameters:
auctions(object): A shared object that stores all auctions.entity(string): The name of the item.startingPrice(number): The minimum price to start the auction.
- Returns: Nothing (updates the
auctionsobject).
2 updatePrice(auctions, entity, bidPrice)
Places a new bid for the item.
- A new bid is only accepted if it is greater than both the starting price and the current highest bid.
- Bids are ignored if the item has already been claimed.
- Parameters:
auctions(object): The shared auction data.entity(string): The item being bid on.bidPrice(number): The new bid price.
- Returns: Nothing (updates the bid in
auctions).
3️ callBid(auctions, entity, callPrice)
Attempts to claim the item with a final offer.
- If the item is unclaimed and the
callPriceis greater than or equal to the current bid, the call is "successful" and the item is marked as sold. - Otherwise, the call is "unsuccessful".
- Parameters:
auctions(object): The shared auction data.entity(string): The item to claim.callPrice(number): The price the bidder wants to claim the item at.
- Returns:
"successful"or"unsuccessful"
Sample Test Case 0
Input
startAuction vase 100
updatePrice vase 150
updatePrice vase 200
callBid vase 210
Output
successful
Explanation:
- Auction for
vasestarts at 100. - Bids of 150 and 200 are valid and update the price.
- A callBid of 210 is higher than the current bid (200) — item is claimed.
Sample Test Case 1
Input
startAuction car 5000
callBid car 4500
callBid car 5000
Output
unsuccessful
successful
Explanation:
callBidof 4500 is below starting price — rejected.callBidof 5000 is equal to starting price — accepted.
Constraints
- Item names are unique lowercase English strings (
1 ≤ length ≤ 100). 1 ≤ startingPrice, bidPrice, callPrice ≤ 10^5.- Once claimed, no further updates or claims are allowed on that item.