r/AlgoExpert • • Feb 18 '20

New Coding Interview Question Added, it is of UBER.

1 Upvotes

r/AlgoExpert • • Dec 17 '20

Why can't I copy code from the provided solutions?

2 Upvotes

Seems really stupid that I'm not allowed to copy code from the provided solutions when I have purchased the whole thing. How can I quickly test if a given solution passes all test cases for the corresponding problem on Leetcode?

For instance, the validate BST solution (Java) doesn't pass all test cases of the Leetcode Validate BST problem.


r/AlgoExpert • • Jan 06 '21

Reverse Integer Solution explained with Animations. Coding the Answer and Analysing the method

Thumbnail
youtube.com
0 Upvotes

r/AlgoExpert • • Feb 27 '20

Solve this!

Thumbnail self.codingproblems
0 Upvotes

r/AlgoExpert • • Mar 04 '20

Day 8:[2020-03-4]: Problem of the day [Asked by Google]

Thumbnail self.codingproblems
0 Upvotes

r/AlgoExpert • • Mar 03 '20

Interesting Question!!

Thumbnail self.codingproblems
1 Upvotes

r/AlgoExpert • • Feb 14 '20

Solve Coding Problems from here(LINK IN DESCRIPTION)

1 Upvotes

r/AlgoExpert • • Mar 17 '20

Day 9: [2020-03-4] Problems of the day!

1 Upvotes

Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value.

Your algorithm's runtime complexity must be in the order of O(log n).

If the target is not found in the array, return [-1, -1].

Example 1:

Input: nums = [5,7,7,8,8,10], target = 8
Output: [3, 4]

Example 2:

Input: nums = [5,7,7,8,8,10], target = 6
Output: [-1, -1]

Sample Input:

5 7 7 8 8 10
8

Sample Output:

[3, 4]

**Try to solve it in Time = O(log(N))


r/AlgoExpert • • Dec 02 '20

Add Two Numbers Solution explained with Animations. Coding the answer with Linked Lists and Analysing the method

Thumbnail
youtube.com
1 Upvotes

r/AlgoExpert • • Dec 27 '20

Does the Data Structures crash course also include how to implement those data structures in Python?

1 Upvotes

I'm looking into AlgoExpert to prepare for coding interviews. I have experience using Python to write scripts and understand functions, classes, loops, etc. What attracted me to AlgoExpert is the Data Structures Crash Course that it comes with.

Will the crash course teach me how to implement a linked list or a stack in Python or will it just explain the structures conceptually?

I saw this under the FAQ on the website:

In the same vein, we also make a few of our Data Structures Crash Course, Systems Design Fundamentals, and Behavioral Interview Prep videos freely accessible.

I was wondering where I could access these sample videos.


r/AlgoExpert • • Jan 17 '21

Integer to Roman Numerals, solving with Dynamic Programming. Coding the Answer and Analysing the method

Thumbnail
youtube.com
1 Upvotes

r/AlgoExpert • • Jan 09 '22

Coin Change Problem Mock Interview - Pass

Thumbnail
youtu.be
2 Upvotes

r/AlgoExpert • • Dec 06 '20

Odd Even Linked List Solution explained with Animations. Coding the answer with Linked Lists and Analysing the method

Thumbnail
youtube.com
2 Upvotes

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 • • 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 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 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 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 • • 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 • • 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 • • Mar 11 '21

Algorithm Visualisation

1 Upvotes

Hi,

I am working on and off on this python library which generates table for arrays when their index are accessed. This is still in alpha, so will have many bugs. I am open to suggestions and bug reports.

https://pypi.org/project/algoviz/


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!