Sai Subramanyam has Published 80 Articles

Graph Traversals in Javascript

Sai Subramanyam

Sai Subramanyam

Updated on 15-Jun-2020 11:34:08

259 Views

Graph traversal (also known as graph search) refers to the process of visiting (checking and/or updating) each vertex in a graph. Such traversals are classified by the order in which the vertices are visited.

Node in Javascript

Sai Subramanyam

Sai Subramanyam

Updated on 15-Jun-2020 11:31:41

244 Views

Each element in a tree is a node. We need to define a node before we proceed to define a binary tree as a tree consists of nodes. We'll create a very simple node definition that has 3 properties, namely: left, right and data.left − This holds the reference to ... Read More

Inserting a key into a tree in Javascript

Sai Subramanyam

Sai Subramanyam

Updated on 15-Jun-2020 11:29:40

747 Views

The first insertion in a newly created binary tree creates a node at the root. Further insertions will be inserted according to the binary search tree property of left children being smaller than parent and right ones being greater than parents.Let us look at how we can implement this algorithm ... Read More

Search Element in an Javascript Hash Table

Sai Subramanyam

Sai Subramanyam

Updated on 15-Jun-2020 11:06:23

456 Views

We've kind of already implemented this in our put method. Let us look at it again in isolation.Exampleget(key) {    let hashCode = hash(key);    for(let i = 0; i < this.container[hashCode].length; i ++) {       // Find the element in the chain       if(this.container[hashCode][i].key === ... Read More

Loop through a hash table using Javascript

Sai Subramanyam

Sai Subramanyam

Updated on 15-Jun-2020 11:01:51

2K+ Views

Now let us create a forEach function that'll allow us to loop over all key-value pairs and call a callback on those values. For this, we just need to loop over each chain in the container and call the callback on the key and value pairs.ExampleforEach(callback) {    // For ... Read More

The HashTable Class in Javascript

Sai Subramanyam

Sai Subramanyam

Updated on 15-Jun-2020 10:58:43

196 Views

Here is the complete implementation of the HashTable class. This could of course be improved by using more efficient data structures and collision resolution algorithms.Exampleclass HashTable {    constructor() {       this.container = [];       // Populate the container with empty arrays       // ... Read More

Binary Tree in Javascript

Sai Subramanyam

Sai Subramanyam

Updated on 15-Jun-2020 10:54:43

291 Views

Binary Tree is a special data structure used for data storage purposes. A binary tree has a special condition that each node can have a maximum of two children. A binary tree has the benefits of both an ordered array and a linked list as search is as quick as ... Read More

Creating Arrays using Javascript

Sai Subramanyam

Sai Subramanyam

Updated on 15-Jun-2020 07:31:06

242 Views

There are many ways to create an Array in JavaScript. We'll look at how to create an empty array first using 2 methods.let myArr = []; let myArr = new Array();Both of the above lines create an empty array. The JavaScript community always prefers the first method as it is ... Read More

Inserting rows to an internal table through debug in SAP ABAP

Sai Subramanyam

Sai Subramanyam

Updated on 12-Mar-2020 12:35:38

5K+ Views

This can be done using any of the below methods −In the Tools window → Navigate to Service menu → you can add a new rowThis can also be done by using T-Code SE11 → Select the relevant table. Navigate to Table Content → DisplayMake sure Debug mode is ON. ... Read More

Source code of ABAP reports without restriction

Sai Subramanyam

Sai Subramanyam

Updated on 14-Feb-2020 08:00:24

575 Views

If you have to use RFC, you can write RFC enabled function module. You can write a new FM that allows you to retrieve program source code. To start with, you need to create a structure as shown in below and based on which you have to create a table ... Read More

Advertisements