This course is about the fundamental concepts of algorithmic problems, focusing on backtracking and dynamic programming. 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:
- what are recursion and recursive methods
- linear and binary search
- tower of Hanoi problem
Section 2:
- what are selection algorithms
- quickselect algorithm
- the secretary problem
Section 3:
- what is backtracking
- n-queens problem and Hamiltonian cycle problem
- knight's tour problem
- Sudoku game
Section 4:
- what is dynamic programming
- knapsack problem
- coin change problem and rod cutting problem
Section 5:
- bin packing problem
- closest pair of points problem
Section 6:
- top interview questions (Google, Facebook and Amazon)
The first chapter is about backtracking: we will talk about problems such as n-queens problem or hamiltonian cycles, coloring problem and Sudoku problem. In the second chapter we will talk about dynamic programming, theory then the concrete examples one by one: fibonacci sequence problem and knapsack problem.
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, EPAM etc.)
Thanks for joining the course, let's get started!
- Students should have some basic programming background (loops, classes, objects etc.)
You will understand the following concepts:
- Recursion
- Backtracking
- Search algorithms: linear and binary search
- Dynamic programming
Hi! Unfortunately I made a mistake in the implentation: in the for loop we consider all the possible moves so instead of boardSize.length we should use xMoves.length (so the number of possible moves)
public boolean solveProblem(int stepCount, int x, int y) { if (stepCount == Constants.BOARD_SIZE * Constants.BOARD_SIZE) { return true; } for (int i = 0; i < xMoves.length; ++i) { int nextX = x + xMoves[i]; int nextY = y + yMoves[i]; if ( isValidMove(nextX, nextY) ) { this.solutionMatrix[nextX][nextY] = stepCount; if ( solveProblem(stepCount + 1, nextX, nextY) ) { return true; // good solution, keep going } this.solutionMatrix[nextX][nextY] = Integer.MIN_VALUE; } } return false; }
Sorry for the inconvenience!