Animation 404 Not Found

When you are writing a website, an essential part of it is a 404 page. This is the page that tells the user that a page they are looking for does not exist. With this in mind, you need a 404 page that is informative and provides feedback on what to do. This Tutorial, the post will teach you how to write an animated 404 page in HTML CSS. Animation 404 Not Found – HTTP 404 – Page not found HTML CSS design Tutorial

404 Not Found error is one of the most common HTTP error codes. You might be familiar with these error messages.

Shortest path problem in DAG can be solved by our derived formula. Deleting the 2->0 arrow in the above graph will make the graph acyclic.

The code for an acyclic graph would be:

The interesting point is that even in cyclic graphs the shortest path can be found using DP, but in that case an additional parameter k has to be added which means ‘maximum k’.

What is the shortest path using ta edge?’. Then that will be Belmanford algorithm!


In the code we have two parameters u

Animation 404 Not Found – HTTP 404 – Page not found HTML CSS design Tutorial

And even if n is passed, the state of the problem is actually only the first parameter. u can have values from 0 to n−1. For each subproblem we have to check which city has a connection with that city by running a loop, there can be maximum n connections. To get the total complexity we multiply the number of states and the inner complexity O(n∗n).


Iterative version:

Writing the iterative version of this problem is a little harder but possible. We know that for iterative DP the subproblems must be arranged in topological order. Because in each state you have to make sure that you have calculated the dependent states beforehand. For Fibonacci the task was very simple, 0,1,2,3…

Thus the states were advancing, but for the graph the matter is a little more difficult. You can learn how to do topological sorting of nodes in a graph from here. After sorting in above example we get 0,3,1,2,4

. If you run the loop from the opposite side of this array, you will build up the DP table.

It’s okay if you don’t write an iterative solution to this problem right now, an iterative solution is complicated and won’t give you any advantage. Iterative DP We will learn better writing while solving LIS, Knapsack.

So far you have learned:

  How to determine the parameters or states of the subproblem

  How to go from one state to all other states to find the optimal solution

  A problem cannot be solved with DP if it has cyclic dependencies, called DAG.

Still not getting the confidence to solve DP? No problem, this is just the beginning, after reading the next chapter you will have the confidence to solve a couple of problems yourself.

Dynamic Programming – 1 (Fibonacci)

The name dynamic programming may sound a bit difficult but the concept behind it is quite simple. Dynamic programming can be described in one word – divide a problem into smaller sub-problems and solve them, but do not solve the same sub-problem more than once.

Roughly speaking, this is dynamic programming. But it takes a little experience to understand when a problem can be solved with dynamic programming. So in this series we will see what dynamic programming is and some common problems that can be solved with dynamic programming.

The term dynamic programming or DP is a bit confusing because the word ‘dynamic’ is not used in a very meaningful way here. Dr. Richard Bellman (father of Bellman Algorithm) uses this name for some bureaucratic reasons, you can find the story if you search on Wikipedia.

The reason for saying this at the beginning is because I know that after learning dynamic programming you will wonder which part of this technique is ‘dynamic’! No need to worry, Bellman used this strange name to save a research grant.

The first prerequisite to learning dynamic programming is to understand recursion. If you don’t have a good idea about recursion, you can read this article. Also, I hope you have an understanding of time and space complexity.

I have used MIT’s lecture series as the main reference for this series, you can learn DP directly from there if you want.

Dynamic programming

Dynamic programming is not a specific problem-solving algorithm, but rather a problem-solving technique that can be used to solve many types of optimization problems or counting problems, such as Fibonacci, coin change, matrix chain multiplication.

It would not be wrong to call dynamic programming a kind of brute force algorithm. It divides a problem into smaller parts to find the correct solution from all possible subproblems. But it’s a bit of clever brute force that only works on polynomial complexity. There are many problems that dynamic programming is the only polynomial algorithm to solve.

Animation 404 Not Found – HTTP 404 – Page not found HTML CSS design Tutorial

Fibonacci sequence

We will start with the simplest example. Italian mathematician Leonardo Pisano Bigollo, whom we know as Fibonacci, discovered a number series while observing the breeding of rabbits. The series is as follows:

  0, 1, 1, 2, 3, 5, 8, 13, 21, 34 ….

Note that every number except the first two numbers is the sum of the previous two numbers. We imagine a function $ that returns the $th Fibonacci number. Expressing the formula for Fibonacci numbers in terms of recursive functions, we get:

Writing the code in C++ would look like this:

We were able to divide the problem into two smaller subproblems. Do you know the complexity of this code? If we call the function, the function call to find the 5th Fibonacci is shown in the tree below:

Two function calls are made for all values from 0 to n (except the base case). The time complexity is O(2n).

A. It is exponential complexity that will work very slowly. We need something better.

You may have noticed by now that I f(3)

I have identified K in two separate places. Calculating f(5) calls f(3) twice and both times we call f(3).

Solving all the subproblems below.

I said in the beginning about dynamic programming “break a problem into smaller sub-problems to solve but never solve the same sub-problem more than once”. Here we are divided into subproblems but solving the same subproblem repeatedly. So instead of doing that, saving the results of the subproblem in a table only works. If we see that we know the result of any subproblem, then there is no need to solve it again.

We use an array named memo to store the subproblem results. At the very beginning the array must contain a value that can never be an answer, in this case we have −1

using Each time before calling the recursive function, I check whether the solution of the subproblem is stored in the array, and if so, I return it. If not, the result of the subproblem is calculated and saved in the array first and then returned.

Now the time complexity of our code becomes O(n).

Because we have n subproblems which are f(0),f(1)….f(n)

And we solve each subproblem only 1 time. We have not done any other work in this function except calling the recursive function, if we did it would have multiplied its time complexity, we will see that in the next problem.

There is a name for saving the results of subproblems in this way, that is Memoization. An AI researcher named Donald Mitchie coined the term from the Latin word memorandum, which is not very different from the English word memorization.

There is no requirement that code in dynamic programming be recursive. To write iterative code, the subproblems must be arranged in topological order in mind and the results must be built up from the subproblem that we know the answer to (base case). Topological order means how many events are arranged in the order in which they depend on each other.

Animation 404 Not Found – HTTP 404 – Page not found HTML CSS design Tutorial

Before Download

You must Join our Facebook Group and Subscribe YouTube Channel

All Links in Below:

Join Our FreeWebsiteCreate Facebook Group to get an instant update for projects, templates, design resources, and solutions.

Join Our YouTube Channel & Subscribe with Bell Icon for New Video:

Join Our Official Facebook Page For the Latest updates All Code Projects are Free:

Visit our service page to get premium services.

Free Website Create – HTML CSS, PHP, JavaScript Programming Projects For Free

Follow Us

Thank You,

Stay with

Share the post if necessary.

Before Download

You must Join our Facebook Group and Subscribe YouTube Channel tries to provide HTML, CSS, SCSS, JavaScript, React, Android Studio, Java, PHP, Laravel, Python, Django, C#(C Sharp), and projects 100% free. We try to make learning easier. Free Website Create always tries to give free projects to new learners. Free projects and source code will help to learn quickly.

They can save time and learn more. In this post, we share a free portfolio project website code with HTML and CSS. This free code portfolio contains a single landing page with a responsive design. In this post, we get a free best carpenter and craftsman service website designed by FreeWebsiteCreate with HTML, CSS, Bootstrap, and JavaScript.

To get a free website project code,

Keep bookmarking our website, Save categories links, Follow Social Media, Follow the youtube channel Join Facebook groups.

Stay with

Share the post if necessary.

Leave a Comment