AVL Balance Tree in C++

AVL TREE IMPLEMENTAION:#include#include#includestruct avl_node{    int data;    struct avl_node *left;    struct avl_node *right;}*root;int max(int a,int b){if (a>b){return a;}else { return b;}}class avlTree{    public: avlTree() {    root = NULL; }int height(avl_node *temp){    int h = 0;    if (temp != NULL)    { int l_height = height (temp->left); int r_height =Continue reading “AVL Balance Tree in C++”

Typedef in C++

The typedef-names are aliases for existing types, and are not declarations of new types. Typedef cannot be used to change the meaning of an existing type name (including a typedef-name). Once declared, a typedef-name may only be redeclared to refer to the same type again. Typedef names are only in effect in the scope whereContinue reading “Typedef in C++”

Shift And Rotate Instructions in Assembly Language

Shift And Rotate Instructions in Assembly Language … Code by Programming SeekerzZZZ…Using Commands SHL ,SHR ,SAL ,SAR ,ROR ,ROL ,RCR ,RCL include irvine32.inc.datamsg byte  ”  Actual No is:                             “,0msg1 byte ” No After 2 Arthmatic Right Shift (SAR):    “,0,13h,10hmsg2 byteContinue reading “Shift And Rotate Instructions in Assembly Language”

Red and Black Tree in C++

RED AND BLACK TREE: All the case’s of Insertion Deletion , Searching and Display ” Using typedef and Structure user define data types.Code in C++ ↓↓↓↓↓↓↓Code is Bellow ☺ ☻ ↓↓↓↓↓↓↓↓↓↓↓↓ Source code:Programming Seekerz :  ☺#include #include #include #include enum rbtree_node_color { RED, BLACK }; typedef struct rbtree_node_t {    void* key;    void* value;   Continue reading “Red and Black Tree in C++”

Coping Reverse Array into Another Array

This Program Take an array and copy that array into another array after reversing it  #includevoid main(){int A[]={0,1,2,3,4,5,6,7,8,9,10};int B[10];cout<<"\n Array A is: ";for(int i=0;i<=10;i++){cout<<A[i]<<"  ";}for(int i1=0,j=10;i1<=10;i1++,j–){B[j]=A[i1];}cout<<"\n Array B is: ";for(int i2=0;i2<=10;i2++){cout<<B[i2]<<"  ";}}

Merge Sorting in Assembly Language

This Program Take 2 Sorted Array merge them so that the final array will also be sorted ..Assembly Program by Programming Seekerz include irvine32.inc .dataarr1 byte 10 DUP(?)arr2 byte 10 DUP(?)arr3 byte 20 DUP(?)len1 dword ?len2 dword ?len3 dword ?msg1 byte ” Enter 10 Numbers in Array 1: “,0msg2 byte ” Enter 10 numbers inContinue reading “Merge Sorting in Assembly Language”

Bubble Sort in Assembly Language

include irvine32.inc .dataarray byte 10 DUP(?)swap byte 0msg byte ” Enter 10 NUmber: “,0msg1 byte ” After Sorting : “,0msg2 byte ”   “,0 .codemain proccall clrscrcall crlfmov edx,offset msgcall writestringcall crlfmov edx,offset arraymov ecx,lengthof arraymov esi,0 L1:call readintmov array[esi],alinc esiloop L1 mov bx,1mov ax,8 mov edx,offset array .while bx > 0mov bx,0mov si,0 .whileContinue reading “Bubble Sort in Assembly Language”

Program to check No is Palindrome in Assembly

This Program Take a No from User Reverse it to check that it is Palindrome or Not Assembly Language Code From Programming SeekerzzZZ include irvine32.inc .datanum word 0key word 0temp word 0i word 0reverse word 0msg byte “Enter the number: “,0msg1 byte ” No is Palindrome “,0msg2 byte ” Not  a Palindrome “,0 .codeMain proccallContinue reading “Program to check No is Palindrome in Assembly”

Binary Search Code in Assembly Language

Binary Search Code in Assembly Language … Compiler Masm615 include irvine32.inc .dataarray byte 10 DUP(?)num byte ?first byte 0middle byte 0last byte 0msg1 byte ” Enter 10 Number in Array : “,0msg2 byte ” Enter Number to Find: “,0msg3 byte ” Found “,0msg4 byte ” Not Found “,0 .codemain proccall clrscr call crlfmov edx,offset msg1call writestringcallContinue reading “Binary Search Code in Assembly Language”