Posts

Showing posts from February, 2022

Print First 20 Prime Numbers In Javascript | letsbug

      Many time we are working on some of our project or solving some challenges we are required to check if the number is prime number or print the prime number. So therefor in this article we are print prime number from 1 to 20 .  Printing First 20 Prime Numbers code: // javascript program to print prime number from 1 to 20 function prime () {     for ( let i = 2 ; i <= 20 ; i ++ ) {         let prime = true ;         for ( let j = 2 ; j < i ; j ++ ) {             if ( i % j == 0 ) {                 prime = false ;                 break ;             }         }         if ( prime ) {             console . log ( i );         }     } } prime (); output: 2 3 5 7 11 13 17 19

Introduction To Machine Learning MCQs with answers | letsbug

MCQs for intro to Machine Learning 1. _______ is about developing code to enable the machine to learn to perform tasks and its basic principle is the automatic modeling of underlying processes that have generated the collected data. Data Science Machine Learning(ML) Data Analytics All of the above Answer: 2 : machine Learning(ML)

How To Read Data From Terminal In Javascript With Node.js | letsbug

Image
    This is going to be short article on how you can make command line interface with node.js in Javascript. If you have been working with node.js you known that you can write something to the console with console.log method from you javascript file. But read some data from the terminal is something different, it is very in some other languages like c  and python.     In javascript with node.js you have to do a little work. Start by requiring the readline module which is built in the node.js and then we call the method createInterface with process standard input and output as its parameter. Now basic foundation is done over here.     Now we have lots of different methods that can be used but are going to use the question method which will prompt user to with a question to enter some data and then reads that data and returns us that data in a callback function.     Then will can use that data to process it and do something with it. and at last we close the interface with close meth

Multiple Choice Questions On Tree Data Structures | letsbug

  MCQs On Tree Data - Structure

Multiple Choice Questions On Graph Data Structures | letsbug

  MCQs On Graphs Data - Structure

Create A Binary Search Tree In Python | letsbug

      Binary Search Tree is a  tree data structure  where binary tree is either empty or non-empty. if it is non-empty then every node contains a key which is distinct and satisfies the following properties: Values less than its parents are places at left side of the parent node. Values greater than its parent are placed at right side of the parent node. The left and right subtree of are given again binary search trees.      In this article we going to implement binary search tree in python language. Binary Search Tree we are going to implement it with linked nodes and not a array.  Binary Search Tree In Python          So first we will create a node class and then a binary tree class. After that we will implement some methods to the binary tree     List of methods that we will implement in the binary tree are : insert  preOrder treversal postOrder treversal inOrder treversal levelOrder treversal height of the tree          Code: Node Class of binary search tree class Node :     def

How To Create A Linked List In Javascript | letsbug

      Hi in this article we are learning how we can implement linked-list in javascript. We have already seen how we can implement stack data structure using linked lists and we are looking at the linked list themselves.     Linked list is a linear data structure which is more flexible than array . That is what i have to say about on defining them. You can learn more about them online we will just focus on implementing them in javascript. And perform operations on them.     List of operation on linked list that we will implement are: insert()  append() print() length() deleteLast() deleteFirst() findAt()     We are implementing the singly linked list in which every node is linked with a next node. Which means node store the address of the node which will come next to it. But does not know or store from where is has come from or its previous node. Linked List In Javascript Code:   // Constructor Class for Ndoes class Node {     constructor (value, next = null ) {         this . v

Linked List Representation Of Stack Data Structure In Javascript | letsbug

Image
      In the article we are going to implement the data structure called stack . If you don't know about them you can visit my previous blog article for the same by clicking here . In this article we are going the implement the stack but not with array but with linked list .     Now what is linked list? You can say linked list is data structure when one single linear data structure is made by linking many smaller nodes like a chain. To learn more about it please visit here.      We will create a Node class which will be are individual node with next pointer and data property to store the data. Then we will link them in the stack class. And perform stack operations on the linked list.     So let's get started      Linked List Representation Of Stack     Our Stack will have following methods or operations on it. Push() Pop() Peek() isEmpty() print() reverse() length() code: //create node class class Node {     constructor (data) {         this . data = data         this . n

Categories

Big Data Analytics Binary Search Binary Search Tree Binary To Decimal binary tree Breadth First Search Bubble sort C Programming c++ Chemical Reaction and equation class 10 class 10th Class 9 Climate Complex Numbers computer network counting sort CSS Cyber Offenses Cyber Security Cyberstalking Data Science Data Structures Decimal To Binary Development diamond pattern Digital Marketing dust of snow Economics Economics Lesson 4 Email Validation English fire and ice Food Security in India Footprints Without feet Forest And Wildlife Resources game Geography Geography lesson 6 glassmorphism Glossary Graph HackerRank Solution hindi HTML image previewer India-Size And Location Insertion Sort Internet Network Status Interview Questions Introduction to cyber crime and cyber security IT javascript tricks json to CSV converter lesson 2 lesson 1 lesson 2 Lesson 3 Lesson 6 lesson 7 Life lines of National Economy life processes Linear Search Linked List lowest common ancestor Machine Learning MCQs median in array Merge sort min and max of two numbers Moment Money and Credit My Childhood Natural Vegetation and Wildlife NCERT Network connectivity devices Network Models Network Security No Men Are foreign Node.js operator overloading P5.js PHP Physical features of India Population Prime Numbers python Quick sort R language Rain on the roof Regular Expression Resources and development reversing array saakhi science Searching Algorithm Selection sort Social Media Marketing social science Software Engineering Software Testing Sorting Algorithm Stacks staircase pattern System Concepts Text Recognition The last Leaf time converter Time Passed From A Date Todo List App Tree Trending Technologies Understanding Economic Development username and password video player Visualization water resources Wired And Wireless LAN साखी
Show more

Popular Posts

Big Data MCQs(multiple choice questions) with answers - letsbug

Digital Marketing MCQ(Multiple Choice Questions) with Answers | part 1 | letsbug

Software Engineering MCQs questions with answers - letsbug