Algorithmic Problems In Java

Algorithmic Problems in Java with Common Interview Questions (Recursion, Backtracking and Divide and Conquer Algorithms)

Last updated 2022-01-10 | 4.5

- Understand recursive approaches
- Understand backtracking
- Understand dynamic programming

What you'll learn

Understand recursive approaches
Understand backtracking
Understand dynamic programming
Understand divide and conquer methods
Implement 15+ algorithmic problems from scratch
Improve your problem solving skills and become a stronger developer

* Requirements

* Basic Java

Description

This course is about the fundamental concepts of algorithmic problems focusing on recursion, backtracking, dynamic programming and divide and conquer approaches. As far as I am concerned, these techniques are very important nowadays, algorithms can be used (and have several applications) in several fields from software engineering to investment banking or R&D.

Section 1 - RECURSION

  • what are recursion and recursive methods

  • stack memory and heap memory overview

  • what is stack overflow?

  • Fibonacci numbers

  • factorial function

  • tower of Hanoi problem

Section 2 - SEARCH ALGORITHMS

  • linear search approach

  • binary search algorithm

Section 3 - SELECTION ALGORITHMS

  • what are selection algorithms?

  • how to find the k-th order statistics in O(N) linear running time?

  • quickselect algorithm

  • median of medians algorithm

  • the secretary problem

Section 4 - BACKTRACKING

  • what is backtracking?

  • n-queens problem

  • Hamiltonian cycle problem

  • coloring problem

  • knight's tour problem

  • Sudoku game

Section 5 - DYNAMIC PROGRAMMING

  • what is dynamic programming?

  • knapsack problem

  • rod cutting problem

  • subset sum problem

Section 6 - OPTIMAL PACKING 

  • what is optimal packing?

  • bin packing problem


Section 7 - DIVIDE AND CONQUER APPROACHES

  • what is the divide and conquer approach?

  • dynamic programming and divide and conquer method

  • how to achieve sorting in O(NlogN) with merge sort?

  • the closest pair of points problem

Section 8 - COMMON INTERVIEW QUESTIONS

  • top interview questions (Google, Facebook and Amazon)

In each section we will talk about the theoretical background for all of these algorithms then we are going to implement these problems together from scratch in Java.

Finally, YOU CAN LEARN ABOUT THE MOST COMMON INTERVIEW QUESTIONS (Google, MicroSoft, Amazon etc.)

Thanks for joining the course, let's get started!

Who this course is for:

  • This course is meant for newbies who are not familiar with algorithmic problems in the main or students looking for some refresher
  • Anyone preparing for programming interviews or interested in improving their problem solving skills

Course content

11 sections • 129 lectures

What are stack and heap memory? Preview 03:41

Stack memory and heap memory simulation Preview 06:02

Memory Quiz

Recursion introduction Preview 06:46

Adding numbers: iteration vs recursion Preview 05:51

Recursion and stack memory (stack overflow) Preview 10:09

Recursion optimization in Java Preview 00:43

Recursion Quiz

Head recursion and tail recursion implementation Preview 06:38

Factorial function - head recursion Preview 06:06

Factorial problem - visualizing the stack Preview 04:14

Factorial function - tail recursion Preview 05:47

Fibonacci numbers - head recursion Preview 04:57

Fibonacci numbers - visualizing the stack memory Preview 08:59

Exercise - Fibonacci-numbers with tail recursion Preview 00:12

Solution - Fibonacci-numbers with tail recursion Preview 00:30

Towers of Hanoi problem introduction Preview 06:18

Tower of Hanoi problem implementation Preview 05:38

Towers of Hanoi - visualizing the stack Preview 07:07

Exercise - solving recursion with iteration Preview 00:08

Solution - solving recursion with iteration Preview 00:05

What is the Euclidean algorithm? Preview 05:59

Euclidean algorithm implementation Preview 04:27

Iteration and recursion revisited Preview 01:39

Recursive Problems Quiz

What is linear search? Preview 01:38

Linear search implementation Preview 03:16

Exercise - linear search with recursion Preview 00:06

Solution - linear search with recursion Preview 00:07

What is binary (logarithmic) search? Preview 03:48

Binary search implementation Preview 08:53

Search Quiz

Selection algorithms introduction Preview 06:42

Quickselect introduction - Hoare algorithm Preview 09:48

Quickselect visualization Preview 08:51

Hoare's Quickselect Quiz

Quickselect implementation Preview 11:56

Exercise - sorting with selection Preview 00:08

Solution - sorting with selection Preview 00:36

What the problem with pivots? Preview 05:49

Selection Algorithms Pivoting Quiz

Advanced selection - median of medians algorithm Preview 07:30

Combining algorithms - introselect algorithm Preview 01:22

Online selection - the secretary problem Preview 08:01

Selection Algorithms Quiz

Backtracking introduction Preview 05:49

Brute-force search and backtracking Preview 04:02

Backtracking Quiz

N-queens problem introduction Preview 08:06

What is the search tree? Preview 03:09

N-queens problem implementation I Preview 09:21

N-queens problem implementation II Preview 06:16

N-queens problem and stack memory visualization Preview 06:21

How to earn $1 million with N-queens problem? Preview 00:52

Hamiltonian paths (and cycles) introduction Preview 08:02

Hamiltonian cycle illustration Preview 04:41

Hamiltonian cycle implementation I Preview 10:16

Hamiltonian cycle implementation II Preview 07:01

Coloring problem introduction Preview 08:48

Coloring problem visualization Preview 04:32

Coloring problem implementation I Preview 07:17

Coloring problem implementation II Preview 05:24

Knight's tour introduction Preview 03:54

Knight's tour implementation I Preview 10:32

Knight's tour implementation II Preview 04:48

Maze problem introduction Preview 04:58

Maze problem implementation I Preview 07:21

Maze problem implementation II Preview 06:52

Sudoku introduction Preview 05:51

Sudoku implementation I Preview 08:36

Sudoku implementation II Preview 03:27

What is the issue with NP-complete problems? Preview 05:04

Backtracking Problems Quiz

Dynamic programming introduction Preview 08:23

Dynamic Programming Quiz

Fibonacci numbers introduction Preview 03:30

Fibonacci numbers implementation Preview 08:35

Knapsack problem introduction Preview 18:07

Knapsack problem example Preview 12:58

Knapsack problem implementation Preview 10:49

Exercise - recursive implementation Preview 00:39

Solution - recursive implementation Preview 00:16

Rod cutting problem introduction Preview 08:03

Rod cutting problem example Preview 11:06

Rod cutting problem implementation Preview 08:45

Subset sum problem introduction Preview 10:11

Subset sum problem example Preview 09:08

Subset sum problem implementation Preview 11:20

Dynamic Programming Final Quiz

Bin packing problem introduction Preview 08:09

Bin packing problem implementation Preview 13:19

Bin packing problem - useful article Preview 00:04

Bin Packing Quiz

What are divide-and-conquer approaches? Preview 09:23

Divide and Conquer Quiz

Binary search revisited Preview 01:45

Merge sort theory Preview 08:17

Merge sort implementation Preview 14:54

Merge sort and stack memory visualization Preview 07:49

Exercise - sort the items in descending order Preview 00:08

Solution - sort the items in descending order Preview 00:26

Closest pair of points problem introduction I Preview 15:20

Closes pair of points problem introduction II Preview 04:14

Closest pair of points implementation Preview 23:53

Closes pair of points - useful article Preview 00:23

Closes Pair of Points Quiz

Palindrome problem overview Preview 00:08

Palindrome problem solution Preview 04:35

Integer reversion problem overview Preview 00:07

Integer reversion solution Preview 08:25

The two eggs problem overview Preview 00:11

Two eggs problem solution I Preview 08:01

Two eggs problem solution II Preview 11:39

Duplicates in an array problem overview Preview 00:08

Duplicates in an array problem solution Preview 07:56

Anagram problem overview Preview 00:04

Anagram problem solution Preview 05:55

Largest sum subarray problem overview Preview 00:05

Largest sum subarray problem solution Preview 10:48

Dutch national flag problem overview Preview 00:10

Dutch national flag problem theory Preview 08:03

Dutch national flag problem solution Preview 06:19

Trapping rain water problem overview Preview 00:14

Trapping rain water problem theory Preview 13:34

Trapping rain water problem solution Preview 07:58

What is Algorhyme? Preview 00:41

Algorhyme - Algorithms and Data Structures Preview 00:53