
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Karthikeya Boyini has Published 2193 Articles

karthikeya Boyini
1K+ Views
We'll be creating a graph class that supports weights and both directed and undirected types. This will be implemented using an adjacency list. As we move to more advanced concepts, both weights and directed nature of the graphs will come in handy.An adjacency list is an array A of separate ... Read More

karthikeya Boyini
4K+ Views
BFS visits the neighbor vertices before visiting the child vertices, and a queue is used in the search process. Following is how a BFS works −Visit the adjacent unvisited vertex. Mark it as visited. Display it. Insert it in a queue.If no adjacent vertex is found, remove the first vertex ... Read More

karthikeya Boyini
232 Views
The formenctype attribute is used to show how the form data should be encoded when it is submitting to the server. It introduced in HTML5 and only used with input type submit an image.Here are the formenctype attribute values −S.NoValue & Description1application/x-www-form-urlencodedThis is the default. All the characters are encoded before sent.2multipart/form-dataNone ... Read More

karthikeya Boyini
282 Views
Let us understand how we're going to create and represent a binary search tree in Javascript. We'll first need to create the class BinarySearchTree and define a property Node on it. Exampleclass BinarySearchTree { constructor() { // Initialize a root element to null. this.root ... Read More

karthikeya Boyini
536 Views
We're going to use the property of a BST to look up elements in it. Let us look at first an iterative implementation of search − ExamplesearchIter(data) { let currNode = this.root; while (currNode !== null) { if (currNode.data === data) { ... Read More

karthikeya Boyini
429 Views
Let us set up a simple class that we'll use to define all these methods on. We'll create a container object to store the hash table and create a display function to display the table. Note that for collision resolution, we'll use chaining.The display function takes each entry (hashed value) ... Read More

karthikeya Boyini
990 Views
When adding elements to a hash table the most crucial part is collision resolution. We're going to use chaining for the same. There are other algorithms you can read about here: https://en.wikipedia.org/wiki/Hash_table#Collision_resolutionNow let's look at the implementation. We'll be creating a hash function that'll work on integers only to keep ... Read More

karthikeya Boyini
1K+ Views
To remove elements, we simply need to find them and remove them using a simple splice function call that removes elements in place from an array.Let us look at the implementation of the same − Exampleremove(key) { let hashCode = this.hash(key); for (let i = 0; i < ... Read More

karthikeya Boyini
572 Views
Sometimes we need to combine containers together using a join function and get a new container. We'll write a static join method that takes in 2 HashTables and creates a new HashTable with all the values. For the sake of simplicity, we'll let the values from the second one override ... Read More

karthikeya Boyini
558 Views
The tree represents hierarchical structures like organization hierarchy charts, file systems, etc. To put it more formally, a tree can be defined recursively (locally) as a collection of nodes (starting at a root node), where each node is a data structure consisting of a value, together with a list of ... Read More