Computer Classes

Computer Classes

Share

This page is regarding class's updates to students. We are tacking all computer subjects for BCA,BCS,MCA,MCS.

Also we are tacking professional courses
- Advance Hardware Networking
- Computer Hardware
- iOS App Development,
- Mac Application Development

11/12/2018

Hello Friends,

Those have 4+ year of exp in angular,follow following link.

Thanks,

26/07/2018

# # Full Static Stack Program:



size 4 // define size of stack, as per our requirement
int stack[size]; // declare array for stack
int top = -1; // Initialy as stack is emepty, set top to -1

// Push => Adding element in stack, at top end of stack
void push ( int value )
{
// Before adding element check for full, if top is equal to size-1 means stack is full
if ( top == size-1 )
{
printf ("Stack is full, we can not insert");
}
else
{
top++;
stack[top] = value;
}
}

// Pop => Deleting element from stack, from top end
void pop ()
{
// Before deleting an element check for empty,
// if top is equal to -1 means queue is empty
if ( top == -1 )
{
printf ("Stack is empty, we can not delete");
}
else
{
// display deleted element
printf ("Deleted Value %d", stack[top]);
top--;
}
}

void displayStack ()
{
int i;
if ( top == -1 )
{
printf ("Stack is empty");
}
else
{
printf ("Stack : \n");
i = top;
while( i >= 0)
{
printf (" %d \n", stack[i]);
i--;
}
}
}

void main ()
{
clrscr ();
push(10);
push(20);
pop();
push(30);
push(40);
push(50);
push(60);
displayStack();
pop();
pop();
pop();
pop();
pop();
pop();
pop();
displayStack();
getch ();
}

20/05/2017

Linked List using CPP (Object oriented concepts):


using namespace std;

class Node
{
int data;
Node *next;

public:

Node(int inData)
{
data = inData;
next = NULL;
}
Node * getNext()
{
return next;
}
void setNext(Node *inNode)
{
next = inNode;
}
int getData()
{
return data;
}
};
class LinkedList
{
Node *start;

public:

LinkedList()
{
start = NULL;
}

void insert(int inData)
{
Node *newNode = new Node(inData);
if ( start == NULL )
{
start = newNode;
}
else
{
Node *temp = start;
while (temp->getNext())
{
temp = temp -> getNext();
}
temp->setNext(newNode);
}
}

void display()
{
Node *temp = start;
while (temp )
{
int d = temp->getData();
printf("%d -> ",temp->getData());
cout getNext();
}
}
};
int main(int argc, const char * argv[])
{
LinkedList *ll= new LinkedList();
ll->insert(10);
ll->insert(20);
ll->insert(30);
ll->insert(40);
ll->display();

return 0;
}

Photos from Computer Classes's post 04/05/2017

Merging :
Merging is nothing but combine two sorted array, result into third sorted array.

/*
C Program to Merge the Elements of 2 Sorted Array
*/

void main()
{
// declare
int array1[50], array2[50], array3[100], m, n, i, j, k = 0;

// accept first array's size and element
printf("\n Enter size of array Array 1: ");
scanf("%d", &m);
printf("\n Enter sorted elements of array 1: \n");
for (i = 0; i < m; i++)
{
scanf("%d", &array1[i]);
}

// accept second array's size and element
printf("\n Enter size of array 2: ");
scanf("%d", &n);
printf("\n Enter sorted elements of array 2: \n");
for (i = 0; i < n; i++)
{
scanf("%d", &array2[i]);
}

i = 0;
j = 0;
k = 0;
// do while either any one of array is ended
while (i < m && j < n)
{
// take smallest element from both array, copy into resulta nt third array
if (array1[i] < array2[j])
{
array3[k] = array1[i];
i++;
k++;
}
else
{
array3[k] = array2[j];
j++;
K++;
}
}
// If elements from first array is remaining
// then copy all remaining elts
if ( i

Insertion sort 04/05/2017

Insertion Sort :

Photos from Computer Classes's post 04/05/2017

Insertion Sort:

Insertion sort is a simple sorting algorithm that builds the final sorted array (or list) one item at a time.
It is process, in which take one bye one element, and insert it into proper position.

Process / Algorithm:
1. Divide array into
a. Sorted array
b. Unsorted Array
2. Start from second element (consider first element as sorted)
- Take first element from unsorted array and copy into temp
variable, then take one bye one element from from sorted
element from end to start
while (j > 0).
If element(from sorted array) is greater than
current(temp) element, then move element to next
position

3. After completion of above procedure(if proper position is
obtained), insert copied current element into temp variable
into proper position

4. Again do the same procedure till end of array.

// program for insertion sort



/* Function to sort an array using insertion sort*/
void insertionSort(int arr[], int n)
{
int i, temp, j;
for (i = 1; i < n; i++)
{
temp = arr[i]; // take & store current element in key
j = i-1;


/* Move elements of arr[0..i-1], that are
greater than temp, to one position ahead
of their current position */
while (j >= 0 && arr[j] > temp)
{
arr[j+1] = arr[j];
j = j-1;
}
arr[j+1] = temp;
}
}
/* Driver program to test insertion sort */
int main()
{
int arr[] = {12, 11, 13, 5, 6};
int n = sizeof(arr)/sizeof(arr[0]);

// cal insertionSort function
insertionSort(arr, n);

print(“Sorted array : “);
for (i=0; i < n; i++)
printf("%d ", arr[i]);

return 0;
}

Photos 04/05/2017

Selection Sort

The selection sort is a combination of searching and sorting. During each pass, the unsorted element with the smallest value is moved to its proper position in the array. The number of times the sort passes through the array is one less than the number of items in the array.

Steps/Procedures

Symbol | in following image divides array into 1.Sorted and 2. unsorted array
Left of | is sorted array and right side is unsorted array

1. Divide array into
a. Sorted array
b. Unsorted Array
2. Take first element from unsorted array and select proper
(smallest) element from unsorted array and swap it with
first element.
3. Every iteration sorted array is increased by one element
4. Again do the procedure till end of array

Program :
// C program for implementation of selection sort


void selectionSort(int arr[], int n)
{
int i, j, min_idx,temp;

// One by one move boundary of unsorted subarray
for (i = 0; i < n-1; i++)
{
// Find the minimum element in unsorted array
min_idx = i;
for (j = i+1; j < n; j++)
if (arr[j] < arr[min_idx])
min_idx = j;

// Swap the found minimum element with the first element
temp = arr[min_idx];
arr[min_idx] = arr[i];
arr[i] = temp;
}
}

/* Function to display an array */
void displayArray(int arr[], int n)
{
int i;
for (i=0; i < n; i++)
printf("%d ", arr[i]);
}
// main function
int main()
{
int arr[] = {64, 25, 12, 22, 11};
int n = sizeof(arr)/sizeof(arr[0]);
selectionSort(arr, n);
printf("Sorted array: \n");
displayArray(arr, n);
return 0;
}

Photos 04/05/2017

Selection Sort

The selection sort is a combination of searching and sorting. During each pass, the unsorted element with the smallest value is moved to its proper position in the array. The number of times the sort passes through the array is one less than the number of items in the array.

Steps/Procedures

Symbol | in following image divides array into 1.Sorted and 2. unsorted array
Left of | is sorted array and right side is unsorted array

1. Divide array into
a. Sorted array
b. Unsorted Array
2. Take first element from unsorted array and select proper
(smallest) element from unsorted array and swap it with
first element.
3. Every iteration sorted array is increased by one element
4. Again do the procedure till end of array

Program :
// C program for implementation of selection sort


void selectionSort(int arr[], int n)
{
int i, j, min_idx,temp;

// One by one move boundary of unsorted subarray
for (i = 0; i < n-1; i++)
{
// Find the minimum element in unsorted array
min_idx = i;
for (j = i+1; j < n; j++)
if (arr[j] < arr[min_idx])
min_idx = j;

// Swap the found minimum element with the first element
temp = arr[min_idx];
arr[min_idx] = arr[i];
arr[i] = temp;
}
}

/* Function to display an array */
void displayArray(int arr[], int n)
{
int i;
for (i=0; i < n; i++)
printf("%d ", arr[i]);
}
// main function
int main()
{
int arr[] = {64, 25, 12, 22, 11};
int n = sizeof(arr)/sizeof(arr[0]);
selectionSort(arr, n);
printf("Sorted array: \n");
displayArray(arr, n);
return 0;
}

31/03/2017

Hi Everyone,

Those are completing BCA/BCS/MCS/MCA,
Greeting for them, we have planned career related session tomorrow morning at 11 AM.
So those are interested can attend the session.
-Venue ( Smart Compu, Near Akurdi Railway Station)
-Contact (9970197499)

Want your school to be the top-listed School/college in Pune?
Click here to claim your Sponsored Listing.

Category

Telephone

Address


Akurdi Railway Station
Pune
411035