Posts

Showing posts from June, 2021

Insert and delete item in a BST

  #include   <stdio.h> #include   <stdlib.h> struct   tree {      int   data ;      struct   tree   * left ;      struct   tree   * right ; }; int   arr [ 9 ],  i   =   0 ; struct   tree   * Createnode ( int   data ) {      struct   tree   * nd   =  ( struct   tree   * ) malloc ( sizeof ( struct   tree ));      nd -> left   =   NULL ;      nd -> right   =   NULL ;      nd -> data   =   data ;      return   nd ; } void   inOrderTraversal ( struct   tree   * root ) {      if  ( root   !=   NULL )     {          inOrderTraversal ( root -> left );  ...

Second source code of HTML

  <!DOCTYPE  html > <html  lang= "en" > <head>      <meta  charset= "UTF-8" >      <meta  http-equiv= "X-UA-Compatible"  content= "IE=edge" >      <meta  name= "description"  content= "width=device-width, initial-scale=1.0" >      <title> My Blog </title>      <style>          #main-header {              text-align :  center ;              background-color :  black ;              color :  white ;              padding :  10 px ;         }   ...

Basic source code of html for begginer

  <!DOCTYPE  html > <html> <head>      <title> Forgings </title> </head> <body>      <a  href= "blog.html" > My Blog </a>      <!-- Headings -->      <h1> Heading One </h1>      <h2> Heading One </h2>      <h3> Heading One </h3>      <!-- Paragraphs -->      <p> Lorem ipsum dolor sit amet consectetur adipisicing elit. Non reprehenderit quis labore veniam         quia odio, neque porro excepturi  <strong> error similique accusantium in rerum </strong>  nisi quae repellendus     ...

Height of the Tree.

  Below is the source code of checking the height of the binary tree. If you need any explanation then please feel free to contact me on my email i.e harshprasadaju@gmail.com. Thankyou. #include   <stdio.h> #include   <stdlib.h> struct   tree {      int   data ;      struct   tree   * left ;      struct   tree   * right ; }; struct   tree   * Createnode ( int   data ) {      struct   tree   * nd   =  ( struct   tree   * ) malloc ( sizeof ( struct   tree ));      nd -> left   =   NULL ;      nd -> right   =   NULL ;      nd -> data   =   data ;      return   nd ; } void   inOrderTraversal ( struct   tree   * root ) {      if  ( root   != ...

Number of Nodes in the binary tree.

Below is the source code of checking the number of Nodes in the binary tree. If you need any explanation then please feel free to contact me on my email i.e harshprasadaju@gmail.com. Thankyou. #include   <stdio.h> #include   <stdlib.h> struct   tree {      int   data ;      struct   tree   * left ;      struct   tree   * right ; }; struct   tree   * Createnode ( int   data ) {      struct   tree   * nd   =  ( struct   tree   * ) malloc ( sizeof ( struct   tree ));      nd -> left   =   NULL ;      nd -> right   =   NULL ;      nd -> data   =   data ;      return   nd ; } void   preOrderTraversal ( struct   tree   * root ) {      if  ( root   ...