Skip to main content

Questions tagged [interview-questions]

This tag is for questions that came up in an interview.

10votes
3answers
2kviews

C++ std::optional implementation for tech interview

I'm preparing for entry-level C++ developer interview and decided to implement some of std:: members. Here's my implementation of std::optional. I would be grateful ...
BreamLashed's user avatar
0votes
3answers
175views

Java exceptions that show the message when converted to String

I’m working with custom exceptions in Java for stack operations. However, I’m unsure if the exception handling is being handled properly, especially in terms of how exceptions are thrown and caught. ...
Somesh Diwan's user avatar
3votes
1answer
94views

File list and monitor

I recently was given a take home assignment for a job interview. The task was specified like so: ...
genghiskhan's user avatar
4votes
2answers
208views

Tetris logic for interview

I would appreciate feedback on the code below which I created during an one-hour live interview session. In particular, while the interviewer pretty much said nothing during the interview, their ...
charlielao's user avatar
5votes
2answers
617views

Thread-safe write-efficient register() method for a Load balancer

The code below was written for an interview question of designing a load balancer with only a register() method. ...
drets's user avatar
13votes
8answers
2kviews

Counting Occurrences of a Specific 3-Bit Pattern in a Byte Array

I was asked this problem in an interview, and this is the solution I came up with. I was told it's not the most efficient solution, but I can't think of any other solution. This is the problem. ...
Jacob's user avatar
4votes
4answers
182views

Reversing string in PHP

I got this task to evaluate my knowledges in PHP. I was asked to avoid using functions like strrev() or array_reverse(). ...
user avatar
2votes
2answers
129views

A thread-safe performant Money Transfer API in Java

This is a popular interview question. It is meant to be done within 30 minutes. The task is to implement a thread-safe performant Bank Account API that allows to transfer, deposit, withdraw and check ...
Sasha Shpota's user avatar
7votes
2answers
1kviews

A thread-safe performant URL Shortener in Java

This is a popular interview question. It is meant to be done within 45 minutes. The task is to implement a thread-safe performant in-memory URL Shortener. My implementation is based on two maps that ...
Sasha Shpota's user avatar
5votes
1answer
534views

Create an address self-complete bar

I recently received the following code challenge in connection with a job interview. After submitting, I was rejected. I want to know what (if anything) I could have done better here. Task Your task ...
Russ J's user avatar
5votes
1answer
250views

String character changes (case insensitive) - Go

I saw this question on one of the socials, presented as an Apple interview question. I have had to paraphrase as it was not given in text format. (Credit: Instagram @greghogg5) Given a string (S) ...
Romeo Lima's user avatar
4votes
1answer
186views

Last Stone Weight Problem in Haskell using list `insert`

Background Saw this problem on TheJobOverflow which seems to be a LeetCode question. It bothered me that the "challenge" of this problem was to recognize the need for a specific data-type (...
WesAtWork's user avatar
11votes
4answers
2kviews

Simple Key Value Database using C

I was recently doing an assignment for a job interview, which asked to create a simple key value database with 4 command line operations: create key value: Adds a key value pair/updates an existing ...
P4PL4's user avatar
3votes
3answers
244views

Extracting records from a 2D List of strings

Recently I had an interview question about extracting records that matched certain criteria from a 2D List of strings. The premise was a CSV file was parsed into a ...
Dragonrage's user avatar
1vote
1answer
126views

Simple Curry function

This is a interview practice question from BFE.dev. Currying is a useful technique used in JavaScript applications. Please implement a curry() function, which ...
Christopher Fimbel's user avatar

153050per page
close