r/AlgoExpert • • Jun 15 '21

All AlgoExpert Questions and Solutions in Java

12 Upvotes

This repo consists of all the AlgoExpert questions and their solutions. Feel free to star/fork it.

Happy problem solving!


r/AlgoExpert • • Mar 04 '21

AlgoExpert Solutions Available in Java!

10 Upvotes

I've started adding solutions to the AlgoExpert problems. You find them in this repository.

You can check them out. They're in Java. Some of the solutions I'll be adding won't be similar to the solutions they're providing.

Also, please ⭐ it if you like it. Let's create free resources for developers!


r/AlgoExpert • • Jan 22 '20

Day 2 [2020-01-22]: Problem of the day [Asked by Microsoft]

10 Upvotes

You are given an array of integers. Return the largest product that can be made by multiplying any 3 integers in the array.

Example:

Input:

[-4, -4, 2, 8]

Output:

128

Explanation:

[-4, -4, 2, 8] should return 128 as the largest product can be made by multiplying -4 * -4 * 8
= 128.

You can comment (solution+ it’s language) for request…

Hope you can solve the question.


r/AlgoExpert • • Jan 21 '20

Day 1 [2020-01-21]: Problem of the day [Asked by Facebook]

10 Upvotes

Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements.

Example:

Input:

[0,1,0,3,12]

Output:

[1,3,12,0,0]

You can comment (solution+ it’s language) in request…

Hope you can solve the question


r/AlgoExpert • • Jan 13 '24

Algoexpert website down?

7 Upvotes

Getting this since this morning, anyone else facing the same issue?


r/AlgoExpert • • Apr 27 '21

I want to buy algoexpert does anyone have promo code or coupons?

5 Upvotes

I want to buy algoexpert does anyone have promo code or coupons?

thank you


r/AlgoExpert • • Jan 29 '20

Day 6 [2020-01-29]: Problem of the day [Asked by AirBNB]

5 Upvotes

Given two strings A and B of lowercase letters, return true if and only if we

can swap two letters in A so that the result equals B.

Example:

Input:

A = "ab", B = "ba"

Output:

True

Input 2:

A = "ab", B = "ab"

Output 2:

False

Input 3:

A = "aa", B = "aa"

Output 3:

True

Input 4:

A = "aaaaaaabc", B = "aaaaaaacb"

Output 4:

True


r/AlgoExpert • • Jan 23 '20

Day 3 [2020-01-23]: Problem of the day [Asked by Facebook]

5 Upvotes

Given a multiset of integers, return whether it can be partitioned into two subsets whose sums are the same.

Example:

Input:

{15, 5, 20, 10, 35, 15, 10}

Output:

True

Explanation -

  • Given the multiset {15, 5, 20, 10, 35, 15, 10}, it would return true, since we can split it up into {15, 5, 10, 15, 10} and {20, 35}, which both add up to 55.

  • Given the multiset {15, 5, 20, 10, 35}, it would return false, since we can't split it up into two subsets that add up to the same sum.


r/AlgoExpert • • Aug 03 '23

Whiteboard tool

4 Upvotes

Hey anyone know what whiteboard tool Clement uses in his lectures?


r/AlgoExpert • • Jun 24 '22

AlgoExpert worth it ??

4 Upvotes

I am preparing for interviews and doing leetcode following the Neetcode channel in youtube. But the only problem it has is they do not explain the complexities completely. Is algoexpert better in that respect ? Is it really worth it ?


r/AlgoExpert • • Oct 22 '21

Leet one or AlgoExpert

4 Upvotes

Which is better? Edit: leetcode or AlgoExpert (can't edit the subject, damn autocorrect)


r/AlgoExpert • • Jan 30 '20

Day 7 [2020-01-30]: Problem of the day [Asked by Google]

4 Upvotes

On our special chessboard, two bishops attack each other if they share the same

diagonal. This includes bishops that have another bishop located between them,

i.e. bishops can attack through pieces.

You are given N bishops, represented as (row, column) tuples on a M by M

chessboard. Write a function to count the number of pairs of bishops that attack

each other. The ordering of the pair doesn't matter: (1, 2) is considered the

same as (2, 1).

For example, given M = 5 and the list of bishops:

* (0, 0)

* (1, 2)

* (2, 2)

* (4, 0)

The board would look like this:

[b 0 0 0 0]

[0 0 b 0 0]

[0 0 b 0 0]

[0 0 0 0 0]

[b 0 0 0 0]

You should return 2, since bishops 1 and 3 attack each other, as well as bishops

3 and 4.


r/AlgoExpert • • Jul 07 '24

algo expert webiste is down.

3 Upvotes

is this happening just for me and is it the same for everyone else too?


r/AlgoExpert • • Jul 17 '22

Does anyone have promocode for algoexpert.I wanted to purchase tech interview bundle

3 Upvotes

r/AlgoExpert • • Jan 05 '22

Merge Intervals Solution explained on a whiteboard. Coding the answer and analysing the method

Thumbnail
youtu.be
3 Upvotes

r/AlgoExpert • • Feb 20 '21

Is AlgoExpert down?

3 Upvotes

r/AlgoExpert • • Feb 15 '21

How long should I try a problem before I watch the solution video?

3 Upvotes

It usually takes me an hour or two to solve a problem on algoexpert, but I’m stuck on one for more than 6 hours. Should I just give up and watch the solution video?


r/AlgoExpert • • Dec 20 '20

Bite Size Video of Increasing Triplet Subsequence. Solving the problem in C++ and analysing the method

Thumbnail
youtube.com
3 Upvotes

r/AlgoExpert • • Feb 11 '20

Day 8 [2020-02-11]: Problem of the day [Asked by Twitter]

3 Upvotes

Given an array, nums , of n integers, find all unique triplets (three numbers, a, b, & c) in nums such that a + b + c = 0. Note that there may not be any triplets that sum to zero in nums , and that the triplets must not be duplicates.

Input:

[0, -1, 2, -3, 1]

Output:

[0, -1, 1], [2, -3, 1]


r/AlgoExpert • • Jan 28 '20

Day 6 [2020-01-28]: Problem of the day [Asked by Amazon]

3 Upvotes

Given a N by M matrix of numbers, print out the matrix in a clockwise spiral.

Example given matrix is shown in input:

Input:

[[1, 2, 3, 4, 5],

[6, 7, 8, 9, 10],

[11, 12, 13, 14, 15],

[16, 17, 18, 19, 20]]

Output:

1

2

3

4

5

10

15

20

19

18

17

16

11

6

7

8

9

14

13

12


r/AlgoExpert • • Jan 27 '20

Day 5 [2020-01-27]: Problem of the day [Asked by Amazon]

3 Upvotes

Given a string S, check if the letters can be rearranged so that two characters that are adjacent to each other are not the same.

If possible, output any possible result. If not possible, return the empty string.

Example:

Input:

"aabbc"

Output:

"ababac"

Input 2:

"aaab"

Output 2:

""


r/AlgoExpert • • Jan 24 '20

Day 4 [2020-01-24]: Problem of the day [Asked by Microsoft]

3 Upvotes

You are given an array of intervals - that is, an array of tuples (start, end).

The array may not be sorted, and could contain overlapping intervals. Return

another array where the overlapping intervals are merged.

Example:

Input:

[(1, 3), (5, 8), (4, 10), (20, 25)]

Output:

[(1, 3), (4, 10), (20, 25)]

Explanation -

  • This input should return [(1, 3), (4, 10), (20, 25)] since (5, 8) and (4, 10) can be merged into (4, 10).


r/AlgoExpert • • Jan 09 '24

Recruiting profile

2 Upvotes

Did anybody unlock their recruiting profile? Are FAANG recruiters really reaching out to you?


r/AlgoExpert • • Mar 15 '22

What software is used to create the conceptional overview portion of the videos on AlgoExpert?

2 Upvotes

The software used on AlgoExpert for the conceptional overview section is really good. I am thinking of creating videos myself for YouTube, the software used by AlgoExpert seems a really good option, but I don't know what the software is. Anyone knows?


r/AlgoExpert • • Jan 09 '22

Coin Change Problem Mock Interview - Pass

Thumbnail
youtu.be
2 Upvotes