Shyam Sunder Kanth

Tech Unleashed

Wohoo!! We're on YouTube

Tuesday, 26 December 2023

C++ : Lecture 26: Stack Implementation Using Queue : Mastering Stack Made Simple !

December 26, 2023 0

 Mastering Stack Made Simple: Your Easy Guide to Data Structures !


Stack implementation using queue code [C++] :


// Shyam Sunder Kanth
// Insta : still_23.6_8
// ? Stack implementation using Queue

#include<iostream>
#include<queue>

using namespace std;

void push(queue<int> &q1, queue<int> &q2, int data){
    // Step 1: Insert element in q2
    q2.push(data);

    // Step 2: Transfer all elements from q1 to q2
    while(!q1.empty()){
        int ele = q1.front();
        q1.pop();
        q2.push(ele);
    }
    
    // Step 3: Swap both queues
    swap(q1,q2);
}

void pop(queue<int> &q1){
    q1.pop();
}

int top(queue<int> q1){
    return q1.front();
}

int main()
{
    queue<int> q1;
    queue<int> q2;

    push(q1,q2,1);
    push(q1,q2,2);
    push(q1,q2,3);
    push(q1,q2,4);


    pop(q1);
    
    cout<<top(q1);


    return 0;
}

In this comprehensive tutorial, I guide you through the process of implementing a stack data structure using a queue in a step-by-step manner. You will learn the fundamental principles behind both stacks and queues, and how to leverage the FIFO (First In, First Out) property of a queue to emulate the LIFO (Last In, First Out) behavior of a stack. By the end of this tutorial, you will have a solid understanding of how to effectively use queues to create a stack, and how this can be applied in real-world scenarios.


Key Topics Covered:

- Concept

- Implementation

- Code


All codes are available at my GitHub account, check them out here: https://github.com/shyamkanth/Placements


Check out other video from DS Revealed Playlist: https://www.youtube.com/playlist?list=PLNXqJgOsTCZOB60T9HDhMf_o8RXbNWgqS


Check out other video from C++ Confusion Buster Playlist: https://youtube.com/playlist?list=PLNXqJgOsTCZNf9SWlh60UJzkryy3nQ6vZ&si=SEq97hVG_AvtjG75


Check out other video from Honest Talk Playlist: https://youtube.com/playlist?list=PLNXqJgOsTCZNNw8_5f9biPcbdZRuFOHO-&si=wWNpaaj93ID2x90W


Check out our channel here: https://www.youtube.com/@DevelopersByte


Timestamps:

0:00 Intro

01:15 Concept

05:15 Implementation

18:20 Code

26:35 Outro


About our channel:

Our channel is about Revealing the secrets of Data Structure. We cover lots of cool stuff such as Codes, Concepts and Implementations.

Check out our channel here: https://www.youtube.com/@DevelopersByte

Don’t forget to subscribe!


Follow me on social media:

Get updates or reach out to Get updates on our Social Media Profiles!

GitHub: https://github.com/shyamkanth/

Instagram: https://instagram.com/still_23.6_8

Instagram personal: https://instagram.com/itz_sammmii

Monday, 18 December 2023

C++ : Lecture 25: Queue - Linked List Implementation : Mastering Queue Made Simple !

December 18, 2023 0

 Mastering Queue Made Simple: Your Easy Guide to Data Structures !


Queue - Linked List Implementation code [C++] :


// Shyam Sunder Kanth
// Insta : still_23.6_8
// ?Queue Linked List implementation

#include<iostream>
using namespace std;

class Node{
    public:
    int data;
    Node* next;

    Node(int data){
        this->data = data;
        this->next = NULL;
    }
};

void enque(Node* &head, Node* &tail, int data){
    // Step 1: Creation of new node
    Node* newNode = new Node(data);

    // Step 2: Handle empty list case
    if(head == NULL){
        head = newNode;
        tail = newNode;
        return;
    }

    // Step 3: Handle non-empty list case
    tail->next = newNode;
    tail = newNode;
}

void deque(Node* &head, Node* &tail){
    if(head==NULL){
        cout<<"Queue underflow.";
        return;
    }
    if(head->next == NULL){
        head = tail = NULL;
        return;
    }
    Node* temp = head;
    head = head->next;
    temp->next = NULL;
}

int front(Node* head){
    if(head == NULL){
        cout<<"Queue is empty.";
        return -1;
    }
    return head->data;
}

int back(Node* head, Node* tail){
    if(head==NULL){
        cout<<"Queue is empty";
        return -1;
    }
    return tail->data;
}

int length(Node* head, Node* tail){
    if(head==NULL){
        cout<<"Queue is empty.";
        return -1;
    }
    Node* temp = head;
    int cnt = 0;
    while(temp!=NULL){
        temp=temp->next;
        cnt++;
    }
    return cnt;
}

void print(Node* head){
    if(head == NULL){
        cout<<"Queue is empty.";
        return;
    }
    Node* temp = head;
    while(temp!=NULL){
        cout<<temp->data<<" ";
        temp = temp->next;
    }
}

bool isEmpty(Node* head){
    if(head == NULL){
        return true;
    }
    return false;
}

int main()
{
    Node* head = NULL;
    Node* tail = NULL;

    enque(head,tail,4);
    enque(head,tail,7);
    enque(head,tail,9);

    deque(head,tail);
    deque(head,tail);

    print(head);

    cout<<endl;

    cout<<"Front element is : "<<front(head)<<endl;
    cout<<"Last element is : "<<back(head,tail)<<endl;
    cout<<"Length of queue is : "<<length(head,tail)<<endl;
    cout<<isEmpty(head)<<endl;

    return 0;
}

Check out this in-depth tutorial on implementing a queue using a linked list in C++. Learn how to create a linked list, enqueue and dequeue elements, and handle edge cases. Whether you're a beginner or an experienced programmer, this video will guide you through the process step by step.

Mastering Queue Made Simple: Your Easy Guide to Data Structures !

Hey, thanks for watching our video about Queue Linked List ! In this video we’ll walk you through:

- Concept

- Operations

- Code


All codes are available at my GitHub account, check them out here:

https://github.com/shyamkanth/Placements


Check out other videos from DS Revealed playlist: https://www.youtube.com/playlist?list=PLNXqJgOsTCZOB60T9HDhMf_o8RXbNWgqS


Check out our channel here: https://www.youtube.com/@DevelopersByte


Find us at: https://shyamkanth.github.io/


Timestamps:

0:00 Intro

0:11 Concept

4:45 Operations

10:39 Code

28:00 Outro


About our channel:

Our channel is about Revealing the secrets of Data Structure. We cover lots of cool stuff such as Codes, Concepts and Implementations.

Check out our channel here: https://www.youtube.com/@DevelopersByte

Don’t forget to subscribe!


Follow me on social media:

Get updates or reach out to Get updates on our Social Media Profiles!

GitHub: https://github.com/shyamkanth/

Instagram: https://instagram.com/still_23.6_8

Instagram personal: https://instagram.com/itz_sammmii

Saturday, 2 December 2023

C++ : Lecture 24 : Queue - Array Implementation : Mastering Queue Made Simple !

December 02, 2023 0

 Mastering Queue Made Simple: Your Easy Guide to Data Structures !


Array implementation of queue code [C++] :


// Shyam Sunder Kanth
// Insta : still_23.6_8
// ?Queue array implementation

#include<iostream>

using namespace std;

class Queue{
    public:
    int *arr;
    int size;
    int front;
    int rear;

    Queue(int size){
        this->size = size;
        arr = new int[size];
        front = -1;
        rear = -1;
    }

    void enque(int data){
        if(rear == size-1){
            cout<<"Queue overflow";
            return;
        }

        if(front == -1){
            front = rear = 0;
            arr[rear] = data;
            return;
        }

        rear++;
        arr[rear] = data;
    }

    void deque(){
        if(front == -1){
            cout<<"Queue Underflow.";
            return;
        }

        if(front == rear){
            front = rear = -1;
            return;
        }

        front++;
    }

    bool isEmpty(){
        if(front == -1){
            return true;
        }
        return false;
    }

    int frontEle(){
        if(front == -1){
            cout<<"Queue is empty.";
            return -1;
        }
        return arr[front];
    }

    int lastEle(){
        if(front == -1){
            cout<<"Queue is empty.";
            return -1;
        }
        return arr[rear];
    }

    int length(){
        if(front == -1){
            cout<<"Queue is empty.";
            return -1;
        }
        int cnt = 0;
        for(int i = front;i<=rear;i++){
            cnt++;
        }
        return cnt;
    }

};



int main()
{
    Queue q(5);

    q.enque(4);
    q.enque(6);
    q.enque(9);

    q.deque();
    q.deque();

    cout<<q.isEmpty()<<endl;
    cout<<q.frontEle()<<endl;
    cout<<q.lastEle()<<endl;
    cout<<q.length()<<endl;

    return 0;
}

In this video tutorial, we will explore the implementation of the queue data structure using arrays. By carefully organizing the elements in a linear data structure, queues are designed to efficiently perform insertions and deletions. With a focus on utilizing arrays for implementing a queue, we will delve into the necessary steps and techniques involved.

Firstly, we will cover the basic concept and characteristics of a queue data structure, providing essential background knowledge. Then, we will dive into a step-by-step demonstration of array implementation, elucidating the intricacies and key points to consider during the process.

By the end of this tutorial, you will have a comprehensive understanding of how to effectively implement queues using arrays and optimize your code for efficient operations. Ideal for beginners and intermediate programmers seeking to enhance their data structure skills, this video promises to equip you with valuable insights into queue implementation.

Don't miss out on this opportunity to bolster your programming prowess and master the implementation of the queue data structure with arrays. Watch this engaging video tutorial now!

If you found this video helpful, please like, comment, and subscribe to our channel for more informative content on data structures and algorithms.

In this video we’ll walk you through:

- Concept

- Operation

- Code


All codes are available at my GitHub account, check them out here:

https://github.com/shyamkanth/Placements


Check out other videos from DS Revealed playlist: https://www.youtube.com/playlist?list=PLNXqJgOsTCZOB60T9HDhMf_o8RXbNWgqS


Check out our channel here: https://www.youtube.com/@DevelopersByte


Find us at: https://shyamkanth.github.io/


Timestamps:

0:00 Intro

0:42 Concept

6:11 Enqueue operation

12:20 Dequeue operation

16:27 Front operation

16:48 Last operation

17:40 Length operation

20:06 isEmpty operation

20:40 Code

34:45 Outro


About our channel:

Our channel is about Revealing the secrets of Data Structure. We cover lots of cool stuff such as Codes, Concepts and Implementations.

Check out our channel here: https://www.youtube.com/@DevelopersByte

Don’t forget to subscribe!


Follow me on social media:

Get updates or reach out to Get updates on our Social Media Profiles!

GitHub: https://github.com/shyamkanth/

Instagram: https://instagram.com/still_23.6_8

Instagram personal: https://instagram.com/itz_sammmii

Monday, 27 November 2023

C++ : Lecture 23 - Queue and its STL implementation

November 27, 2023 0

 Mastering Queue Made Simple: Your Easy Guide to Data Structures !


STL implementation of Queue code [C++] :

 

// Shyam Sunder Kanth
// Insta : still_23.6_8
// ? Queue STL implementation

#include<iostream>
#include<queue>

using namespace std;

int main()
{
    queue<int> q;

    q.push(4);
    q.push(8);
    q.push(9);


    q.pop();
    q.pop();


    cout<<q.size()<<endl;
    cout<<q.front()<<endl;
    cout<<q.back()<<endl;

    return 0;
}

Welcome to "Mastering Queue in C++: Exploring STL Implementation"! In this educational video, we delve into the concept of queues and demonstrate an in-depth understanding of the Standard Template Library (STL) implementation in C++. Queue data structures are vital for managing elements in a First-In-First-Out (FIFO) fashion, and the STL provides efficient and powerful tools to implement this data structure seamlessly.

Throughout this tutorial, we cover the fundamental concepts of queues and their significance in programming. We explore the functions, features, and utilities offered by the C++ STL to facilitate queue implementation. By leveraging the STL's robust queue container, you can effortlessly handle various operations like insertion, deletion, and traversal efficiently.

This video emphasizes hands-on learning, as we guide you through coding examples to illustrate how to apply the STL's queue container effectively. By the end of this tutorial, you will possess a comprehensive understanding of queues and STL implementation, enabling you to build efficient programs that employ queues for optimal data management and manipulation.

Subscribe to our channel for more informative videos on C++ programming and the implementation of various data structures. Stay tuned and expand your knowledge with our upcoming tutorials. Happy coding!


In this video we’ll walk you through:

- Concept

- Implementation methods

- STL implementation

- Code


All codes are available at my GitHub account, check them out here:

https://github.com/shyamkanth/Placements


Check out other videos from DS Revealed playlist: https://www.youtube.com/playlist?list=PLNXqJgOsTCZOB60T9HDhMf_o8RXbNWgqS


Check out our channel here: https://www.youtube.com/@DevelopersByte


Find us at: https://shyamkanth.github.io/


Timestamps:

0:00 Intro

1:12 Concept

5:55 Implementation methods

6:55 STL Implementation

8:17 Methods

13:41 Code

18:25 Outro


About our channel:

Our channel is about Revealing the secrets of Data Structure. We cover lots of cool stuff such as Codes, Concepts and Implementations.

Check out our channel here: https://www.youtube.com/@DevelopersByte

Don’t forget to subscribe!


Follow me on social media:

Get updates or reach out to Get updates on our Social Media Profiles!

GitHub: https://github.com/shyamkanth/

Instagram: https://instagram.com/still_23.6_8

Instagram personal: https://instagram.com/itz_sammmii

Sunday, 26 November 2023

Android Application Development : End Sem Examination ( 5th Sem )

November 26, 2023 0

Android Application Development

End Semester Examination, 2022-23
B. Tech - Semester : 05
Time : 03 hrs. - Max. Marks : 100

Instructions:
  1. All questions are Compulsory
  2. Assume missing data suitably, if any.
Section : A ( 4 x 10 = 40 Marks )
All questions are compulsory
  1. List down the various features of android. Elaborate.
  2. Identify and explain the history of android studio with example.
  3. Outline the use of Dalvik Virtual Machine component of Android Runtime.
  4. Differentiate between Linear Layout and Relate Layout.
  5. What is the use Manifest File in android Application? Give Example of Manifest File.
  6. What is Notification in android? Explain Toast notification.
  7. What is View in Android? Write the XML code for creating TextView.
  8. List the various types of Java classes used in Android for sensors.
  9. What is SQLite? Write a short note on it.
  10. Explain the role of Helper class in database connectivity.
Section : B ( 3 x 6 = 18 Marks )
All questions are compulsory
  1. Discuss the usage of accelerometer and proximity in android application.
    OR
    Elaborate the following Ul controls with example:
    (i) TextView ii) EditText (iii) Button (iv) CheckBox
  2. Elaborate Android toast. Write a program to display "Welcome to Android first class" as toast message.
  3. OR
    Write a code to identify list of all available sensors in mobile phone.
  4. Discuss the use of graphics in android studio. Write a program to draw circle filled with red color in android.
    OR
    Define the architecture of Android. Also explain it's various activities.
Section : C ( 3 x 10 = 30 Marks )
All questions are compulsory
  1. Which of the activity life cycle method is essential? Elaborate all the methods involved in activity life eyele with example.
    OR
    Discuss the various types of intent in android. Discuss the role of intents with suitable example.
  2. Create an application having TextView, EditText and Button. When use click on Button, content in EditText should be displayed in TextView..
    OR
    What is animation? List and explain different types of animations in android.
  3. Create an application in android studio to perform multiplication of two numbers.
    OR
    List all the available layouts in android studio. Compare and contrast all the layouts with example.
Section : D ( 1 x 12 = 12 Marks )
All questions are compulsory
  1. List different types of event Listeners. Differentiate Onclick and OnLongClick with proper example.
    OR
  2. Design an application in android studio as shown in diagram. When user clicks on proceed button, it should display the message "welcome to sharda university". Write code for both xml and java file.
*******************

Wireless Network and Mobile Communication : End Sem Question ( 5th Sem )

November 26, 2023 0

Wireless Network and Mobile Communication

End Semester Examination, 2022-23
B. Tech - Semester : 05
Time : 03 hrs. - Max. Marks : 100

Instructions:
  1. All questions are Compulsory
  2. Assume missing data suitably, if any.
Section : A ( 4 x 10 = 40 Marks )
All questions are compulsory
  1. How Brewster's angle can be calculated?
  2. What is large scale propagation?
  3. Explain the concept of different hand-off strategies.
  4. Explain reflection, diffraction and scattering.
  5. Briefly explain the concept of FDMA.
  6. What is the difference between micro-cell and macro-cell?
  7. What is the forward CDMA channel?
  8. What is the importance of IS95?
  9. What is OFDM?
  10. Enlist some different spread spectrum technologies.
Section : B ( 3 x 6 = 18 Marks )
All questions are compulsory
  1. Define GSM? Describe the key characteristics of GSM in details.
    OR
    Explain a summary table for GSM air interface specification.
  2. Why power control is necessary in IS95?
  3. OR
    What are different CDMA Channels? Explain the functionality.
  4. Define IMT2000 standard? Give the properties of IMT2000.
    OR
    Write the advantages of 4G.
Section : C ( 3 x 10 = 30 Marks )
All questions are compulsory
  1. Draw the GSM architecture. Explain each component in brief.
    OR
    Explain the different elements of GSM radio-subsystem.
  2. Draw the GSM frame structure along with the explanation of each component.
    OR
    Explain the different components of forward CDMA Channels. Explain in details.
  3. Draw the architecture of IMT2000. Write the applications of IMT2000.
    OR
    What are the weaknesses of 5G technology compared with 4G?
Section : D ( 1 x 12 = 12 Marks )
All questions are compulsory
  1. Why is NGN important for wireless communication? Explain the fundamental aspects of NGN with suitable example.
    OR
  2. What are different spread spectrum technologies. Explain each in details.
*******************

Software Engineering and Testing Methodology : End Sem Examination ( 5th Sem )

November 26, 2023 0

Software Engineering and Testing Methodology

End Semester Examination, 2022-23
B. Tech - Semester : 05
Time : 03 hrs. - Max. Marks : 100

Instructions:
  1. All questions are Compulsory
  2. Assume missing data suitably, if any.
Section : A ( 4 x 10 = 40 Marks )
All questions are compulsory
  1. How software engineering is different from other traditional engineering processes?
  2. What do you mean by the feasibility study of software? What content should it contain in the feasibility report?
  3. What will be the impact on software development if we are gathering or formulating the wrong requirements?
  4. Differentiate between Validation And Verification.
  5. Differentiate sequence diagram and Activity diagram.
  6. Process control component maintains current data about the state of operation. Gets data from multiple sources. Supplies data to multiple sinks. Each source process writes directly to the global data store. Each sink process reads directly from the global data store. What type of coupling exists in this system? How it can be overcome.
  7. Define fault, failure and errors. Compare them with one example.
  8. What is white-box testing? How is it performed? Explain each step in detail.
  9. Why Quality management is important?
  10. Differentiate between Software reengineering and reverse engineering.
Section : B ( 3 x 6 = 18 Marks )
All questions are compulsory
  1. The following figure represents access graphs of two modules M1 and M2. The filled circles represent methods and the unfilled circles represent attributes. If method m is moved to module M2 keeping the attributes where they are, what can we say about the average cohesion and coupling between modules in the system of two modules?
    OR
    Draw Use case, component, state, class and activity diagram for Online Attendance Portal where student can view its attendance onto lecture basis as well as cumulative.

  2. Consider a software program that is artificially seeded with 100 faults. While testing this program, 159 faults are detected, out of which 75 faults are from those artificially seeded faults. Assuming that both real and seeded faults are of same nature and have same distribution, the estimated number of undetected real faults is ___________ .
  3. OR
    Consider Mobile tracking system as an example and discuss its levels of testing.
  4. The Annual change traffic for a software system is 15% per year. The development effort is 600 PMs. Compute an estimate for the Annual maintenance effort (AME). If the lifetime of the project is 10 years, what is the total effort of the project?
    OR
    Discuss factors affecting Maintenance Effort.
Section : C ( 3 x 10 = 30 Marks )
All questions are compulsory
  1. Draft the test cases for the following scenario.
    A social networking application is required to upload the image of the user to display as a profile pic like Facebook. The image is necessary to be structured to suit the portfolio. Also, the image should contain the watermark of the profile name. Profile name should be unique for every user. It is necessary that the profile name should be a complete or partial combination of user name, date of birth, city, sex. The Profile name should be limited to 10 characters only.

  2. OR
    Explain CMM with example.
  3. Discuss various types of Debugging approaches. Differentiate between Debugging and testing.
    OR
    Discuss the limitations of Testing and how testing can be done using AWS third party tool.

  4. Discuss how Maintenance can be done? What are its various methods and cost associated with it?
    OR
    Discuss various SQA activities.
Section : D ( 1 x 12 = 12 Marks )
All questions are compulsory
  1. Create DFD and E-R for Result preparation automation system of any university, compare its features and conclude which is best for representation?
    OR
  2. a. The development effort for a software project is 500 person-months. The empirically determined constant (K) is 0.3. The complexity of the code is quite high and is equal to 8. Calculate the total effort expended (M) if
    (i) The maintenance team has good level of understanding of the project (d=0.9).(ii) The maintenance team has poor understanding of project (d =0.1).
    b. Discuss the importance of formal technical review meetings.
*******************