How to make a Personal Portfolio website design

How to make a Personal Portfolio website design using HTML CSS JavaScript with Free Download

A Completely responsive personal website template with HTML, CSS, Bootstrap, and JavaScript. This is also called portfolio website template design and you easily free download it.

The Internet is a creative and collaborative medium for people all over the world. It is also a place where businesses and people can communicate, share ideas, and connect. One of the best ways to do this is through personal websites.

These can be simple sites that serve as marketing tools or elaborate sites that showcase a creative vision. If you are considering building a personal website for your business or personal brand, you may want to consider using a pre-made template. To learn how to create a personal website, use these six templates as a starting point.

What are the benefits of putting words like this? Suppose you are asked to say whether the word “alice” is in the dictionary. You keep trying from the start. First check if there is an edge from root to a, then check if there is an edge from a to l. Then the edge from l to i cannot be found, so you can say that the word alice does not exist.

How to make a Personal Portfolio website design using HTML CSS JavaScript with Free Download

If you search for the word “alg”, you will find all the edges root->a, a->l and l->g, but will not reach any gray nodes at the end, meaning alg is not in the dictionary. If you search for “tom” you will end up at a gray node so the word is in the dictionary.

An easy way to implement trie is to use linked lists. Don’t worry about linked lists, pointers, if you are not used to using linked lists, hopefully you can learn by looking at this implementation. Each of our nodes will have 2 things:

1. A variable to hold the end-mark.

2. Each node can generate edges named a,b,c,……..,x,y,z etc. We will keep a pointer to each character. A pointer will connect one node to another. If added with a pointer named a, it should be understood that there is an edge named a from the current node. Initially all pointers will be “null”.

First we create the node:

struct node {

  bool endpoint;

  node* next[26 + 1];

  node()

  {

      endmark = false;

      for (int i = 0; i < 26; i++)

          next[i] = NULL;

  }

} * root;

int main()

{

  root = new Node();

  return 0;

}

Each element of the next[] array points to another node. If the new node is pointed to by next[0] then the edge name is “a”, for next[1] the edge name is “b”, for next[25] is “z”. Initially all pointers are null. Notice that I have created a constructor “node()” inside the node. Whenever new node() is called to create a new node, the variables will be set to null.

If not, it would have garbage value. The root variable is our root node, the node in red in the images above. Actually root is a pointer, while root=new node(); The line will execute immediately creating a new node and assigning it to the memory address pointed to by root. This is called instantiation in a slightly tongue-in-cheek language. Now we need a function to add the new word to try:

void insert(char* str, int len)

{

  node* curr = root;

  for (int i = 0; i < len; i++) {

      int id = str[i] – ‘a’;

      if (curr->next[id] == NULL)

          curr->next[id] = new node();

      curr = curr->next[id];

  }

  curr->endmark = 1;

}

We will always need the root variable so let’s make a copy of it inside “curr”. Since we are working with pointers, creating a new edge from root is the same as creating a new edge from “curr”. We’re only working with a-z now, so we’ll convert the ASCII values to 0-25 by subtracting the ASCII value of ‘a’. Insert is very easy, we just check if there is any edge from the current node (curr) with the name of the current character, if not we have to create a new node. Then we go to the next node along that edge. I will make the end-mark true at the last node.

How to make a Personal Portfolio website design using HTML CSS JavaScript with Free Download

After inserting, I will search now. It’s actually just like insert. The difference is that I was creating the required edge if it was not there, now I will return false if there is no edge.

bool search(char* str, int len)

{

  node* curr = root;

  for (int i = 0; i < len; i++) {

      int id = str[i] – ‘a’;

      if (curr->next[id] == NULL)

          return false;

      curr = curr->next[id];

  }

  return curr->endmark;

}

Note that I have done everything as insert. Finally, I have returned the endpoint of the last node. If the endmark is true then the word is there, if it is false it is not.

Our main code is finished. We can now add any word to the trie, and search for any word from the trie. Many times creating a try for each test case is a problem with memory limit. So the safe way is to delete the used memory-cells after each case. It is not enough to delete only the root, every node has to be deleted. We can write a recursive function for that:

Complexity: Looping for each word up to the length of the word, the complexity of searching is O(length). The complexity of inserting each word is also the same. How much memory is required depends on the implementation and how well the prefixes of the words match. With the above implementation about 10^6 characters can be inserted in a try (10^6 not words, characters or letters).

If you want you can implement using simple array without try linklist, try it yourself!

Some uses of Tri:

1. There are many words in a dictionary, you have to find out whether a word is there or not. We have solved this problem in the above code.

2. Suppose the telephone numbers of your 3 friends are “5678”, “4322”, “567”. When you dial the first friend, as soon as you press 567, the phone will go to the 3rd friend because the 3rd friend’s number is the prefix of the first person! Many phone numbers are given, is there any such number or is it a prefix of another number? (UVA 11362).

3. A dictionary has many words. Now we have to find out how many times a word appears as “prefix”. For example, the word “al” appears as a prefix 3 times in the above dictionary (algo, algea, also all these words are prefixed with “al”). To figure this out we need to keep a counter variable in each node, increasing the value of the counter every time we visit a node. When searching, the prefix will be found and the counter value will be displayed.

4. When you type a few letters while searching the mobile phonebook, the names that start with that prefix are shown in the suggestion box. Can you try to implement it?

4. Find the “longest common substring” of two strings. (If it is subsequence, it can be done easily with DP, here I want substring).

(Hints: If one or more characters are taken from the end of a string, it is called a suffix of the string, for example, the suffix of blog is g,og,log,blog. And each substring is a prefix of some suffix!! So if you insert all the suffixes into the try Makes it easier!)

5. (Advanced) Perhaps the problem came in 2011 at Daffodil University’s National Contest. A dictionary input will be provided. Every time 2 words of the dictionary will be queried, what is the length of the common prefix between them. For example algo and algea have common prefix alg, length 3. The problem can be solved by extracting the LCA (lowest common ancestor) from the end-mark of the two words in each query by inserting them into the dictionary.

Happy Coding!

How to make a Personal Portfolio website design using HTML CSS JavaScript with Free Download

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 FreeWebsiteCreate.net

Share the post if necessary.

Before Download

You must Join our Facebook Group and Subscribe YouTube Channel




FreeWebsiteCreate.net tries to provide HTML, CSS, SCSS, JavaScript, React, Android Studio, Java, PHP, Laravel, Python, Django, C#(C Sharp), and ASP.net-related 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 FreeWebsiteCreate.net

Share the post if necessary.

Leave a Comment