Posts

heap sort algorithm program using C language

 #include <stdio.h> // Function to print tree structure from array void printTree(int a[], int n) {     for (int i = 0; i < n; i++) {         int left = 2 * i + 1;         int right = 2 * i + 2;         printf("\nParent: %d", a[i]);         if (left < n)             printf(" | Left: %d", a[left]);         else             printf(" | Left: NULL");         if (right < n)             printf(" | Right: %d", a[right]);         else             printf(" | Right: NULL");     }     printf("\n-------------------------\n"); } // Function to heapify a subtree rooted at index i void heapify(int a[], int n, int i) {     int largest = i;          // Root index ...

binary search program in c language

https://www.programiz.com/online-compiler/9F3XFw8LL9vB5  //Program binary search in C language  #include <stdio.h> int main() { printf("Program for Binary search \n"); int a[]={2, 4, 6, 8, 10, 12, 14}; int key,i; int n=sizeof(a)/sizeof(a[0]); int l=0, r=n-1, mid=0; mid=(l+r)/2; printf("\narray elements are"); for(i=0;i<n; i++) {     printf("\t %d",a[i]); } printf("\n length of array=%d",n); printf("\n enter serach value="); scanf("%d",&key); while(l<=r) {  mid=(l+r)/2;     if(a[mid]==key)     {          printf("search key= %d found at index %d \n", key,mid );                break;     }     else if(a[mid]<key)     {         l=mid+1;     }     else     {         r=mid-1;     } } if(l>r) {    printf("search key= %d not found in array \n", ke...

linear search program in c language

 https://www.programiz.com/online-compiler/8zEhYQfuf2edR //Program for linear search in C language  #include <stdio.h> void main() {     printf("Program for linear search \n"); int a[]={2, 4, 6, 8, 10, 12, 14}; int key,i; int n=sizeof(a)/sizeof(a[0]); printf("\narray elements are"); for(i=0;i<n; i++) {     printf("\t %d",a[i]); } printf("\n length of array=%d",n); printf("\n enter serach value\t "); scanf("%d",&key); for(i=0;i<n; i++) { if(a[i]==key)     {     printf("\n search key=%d \t find on index number=%d ",key,i );     break;     }    }   if(i==n)    {        printf("key\t=%d not found in aaray ",key);           } //printf("serach value=%d",k); }

DAA lab AKTU practical b.tech 5th sem

 Program 1: program for recursive linear search and binary search in c language #include <stdio.h> // Recursive Linear Search int recursiveLinearSearch(int arr[], int n, int key, int index) {     if (index >= n)  // Base case: reached end without finding         return -1;     if (arr[index] == key) // Found the element         return index;     return recursiveLinearSearch(arr, n, key, index + 1); // Search next } // Recursive Binary Search int recursiveBinarySearch(int arr[], int low, int high, int key) {     if (low > high) // Base case: not found         return -1;     int mid = (low + high) / 2;     if (arr[mid] == key) // Found         return mid;     else if (arr[mid] > key) // Search left half         return recursiveBinarySearch(arr, low, mid - 1, key);     else // Search...

DWDM 2024 question paper with solution

Image
  Question paper DWDM  2024.    https://www.abesit.in/wp-content/uploads/2024/11/KOE093-DATA-WAREHOUSING-DATA-MINING.pdf Solution DWDM 2024  Solution of DWDM paper 2024 SECTION A – Attempt all questions in brief (2 marks each) a. Define Data Warehousing. A data warehouse is a centralized repository that stores integrated data from multiple sources, enabling analysis, reporting, and decision-making. b. Discuss the Fact Constellation. Fact Constellation is a schema that contains multiple fact tables sharing dimension tables, also known as galaxy schema, suitable for complex databases. c. Explain Distributed DBMS implementation. A Distributed DBMS manages a database distributed across multiple locations, ensuring transparency, consistency, and coordination of data across sites. d. Define Warehousing Software. Warehousing software is a tool or application used to construct, manage, and access a data warehouse for efficient data integration, analysis, and reporting....

B.tech 5th Sem Machin learning lab practical

 Program 1:   Implement and demonstrate the FIND-S algorithm for finding the most specific hypothesis   based on a  given set of training data samples. Read the training data from a .CSV file. import random import csv import pandas as pd att= [['Sunny','Rainy'],               ['Warm','Cold'],               ['Normal','High'],               ['Strong','Weak'],               ['Warm','Cool'],               ['Same','Change']] attribute=len(att) print("attribute length=",attribute) print("\n Most general hypothesis:['?','?','?','?,'?','?']") print("\n Most specific hypothesis:['0','0','0','0','0','0']") a=[] print("\n Given training data set") with open('C:\\Users\pc1\\Desktop\\machine\\ws.csv') as file:     reader=csv.reader(file)     for r in reader:       ...

BCA 3rd year Web Technology(code 304) Web Site development using ASP.NET AND C#

Image
  Web Site development using ASP.NET AND C# UNIT – I Overview of ASP.NET framework, Understanding ASP.NET Controls, Applications, Web servers, installation of IIS. Web forms, web form controls -server controls, client controls, web forms & HTML, Adding controls to a web form ,Buttons, Text Box , Labels, Checkbox, Radio Buttons, List Box, etc. Running a web Application, creating a multiform web project. UNIT- II Form Validation: Client side validation, server Side validation, Validation Controls : Required Field Comparison Range. Calendar control, Ad rotator Control, Internet Explorer Control. State management- View state, Session state, Application state, UNIT- III Architecture of ADO.NET, Connected and Disconnected Database, Create Connection using ADO.NET Object Model, Connection Class, Command Class, DataAdapter Class, Dataset Class. Display data on data bound Controls and Data Grid. Database Accessing on web applications: Data Bind...