Create a custom server using http module and explore the other modules of Node JS like OS, path, event. File 1: os.js 1const os=require('os'); 2console.log('Data retrieved by Using OS Module in Node Js\n'); 3console.log('Hostname:'+os.hostname()+'\n'); …
Read More1-D 1class D1 2{ 3public static void main(String[] args) 4{ 5int month_days[]; 6month_days=new int[12]; 7month_days[0]=31; 8month_days[1]=28; 9month_days[2]=31; 10month_days[3]=30; 11month_days[4]=31; 12month_days[5]=30; 13month_days[6]=31; 14month_days[7]=31; 15month_days[8]=30; 16month_days[9]=31; …
Read MoreMERGE SORT: 1#include <stdio.h> 2#define max 8 3int arr[max]; // we have defined array globally. 4void mergesort(int low, int high); 5void merge(int low, int mid, int high); 6void main() 7{ 8 int i, j; 9 printf("enter the elements\n"); 10 for (i = 0; i < 8; i++) 11 { 12 scanf("%d", …
Read MoreSuper and This keywords of Java Super Keyword: Definition: super is a reference to the immediate parent class of the current object. It is mainly used in the context of inheritance. Usage: Call the parent class's constructor: super() can be used to call the constructor of the parent class. This is often used to …
Read MoreMultithreading in Java is a powerful feature that allows concurrent execution of two or more threads within a program. A thread is a lightweight subprocess and the smallest unit of processing, and multithreading helps improve the performance and efficiency of applications, especially those requiring multiple …
Read MoreHi everyone!! This time, I want to introduce myself as WHO AM I. I should have done this earlier, but since it's never too late, here is a little introduction of who I am. My name is Angel Vyas, sounds like Christian right?? But no, I'm a Hindu(Vyas!!). I was born and brought up in Jaipur, Rajasthan and my schooling …
Read MoreA linked list is a fundamental data structure used in computer science to organize and store a collection of elements. Unlike arrays, linked lists do not require a contiguous block of memory and can efficiently handle dynamic memory allocation. Key Characteristics Nodes: A linked list is composed of nodes, where each …
Read MoreA stack is a fundamental data structure in computer science that operates on a Last In, First Out (LIFO) principle. This means that the last element added to the stack is the first one to be removed. You can think of a stack like a stack of plates: you add new plates to the top and remove them from the top as well. Key …
Read MoreA circular queue is a data structure that operates on a First-In, First-Out (FIFO) basis but with a circular arrangement. Unlike a linear queue, where elements are added at the rear and removed from the front, a circular queue connects the last position back to the first, forming a circle. This allows for efficient use …
Read MoreA simple queue is a fundamental data structure that follows the First-In, First-Out (FIFO) principle. This means that the first element added to the queue will be the first one to be removed, just like people standing in line—whoever gets in first is served first. Key Operations in a Simple Queue: Enqueue (Insertion): …
Read More