AmitDiwan has Published 10744 Articles

Python program to right rotate the elements of an array

AmitDiwan

AmitDiwan

Updated on 16-Apr-2021 11:58:06

532 Views

When it is required to right rotate the elements of a list, the elements are iterated over, and a last element is assigned a value, after which the elements are iterated over, and an element is swapped.Below is a demonstration of the same −Example Live Demomy_list = [31, 42, 13, 34, ... Read More

Python program to print the elements of an array present on even position

AmitDiwan

AmitDiwan

Updated on 16-Apr-2021 11:57:47

646 Views

When it is required to print the elements of a list that are present at even index/position, a loop can be used to iterate over the elements, and only check the even positions in the list by specifying the step size as 2 in the range function.Below is a demonstration ... Read More

Python program to print the elements of an array present on odd position

AmitDiwan

AmitDiwan

Updated on 16-Apr-2021 11:57:26

2K+ Views

When it is required to print the elements of a list that is present in odd index/position, a loop can be used to iterate over the elements, and only check the odd positions in the list by specifying the step size as 2 in the range function.Below is a demonstration ... Read More

Python program to print the elements of an array in reverse order

AmitDiwan

AmitDiwan

Updated on 16-Apr-2021 11:57:09

784 Views

When it is required to print the elements of an array in reverse order, the list can be iterated over from the end.Below is a demonstration of the same −Example Live Demomy_list = [21, 32, 43, 54, 75] print("The list is : ") for i in range(0, len(my_list)):    print(my_list[i]) print("The ... Read More

Python program to print the duplicate elements of an array

AmitDiwan

AmitDiwan

Updated on 16-Apr-2021 11:56:51

2K+ Views

When it is required to print the duplicate elements of an array, the list elements are iterated over, and a nested loop is used.Below is a demonstration of the same −Example Live Demomy_list = [1, 2, 5, 6, 8, 9, 3, 4, 8, 9, 1, 8] print("The list is :") print(my_list) ... Read More

Python program to left rotate the elements of an array

AmitDiwan

AmitDiwan

Updated on 16-Apr-2021 11:56:27

2K+ Views

When it is required to left rotate the elements of an array, the array can be iterated over, and depending on the number of left rotations, the index can be incremented that many times.Below is a demonstration of the same −Example Live Demomy_list = [11, 12, 23, 34, 65] n = ... Read More

Difference Between Stack and Heap

AmitDiwan

AmitDiwan

Updated on 16-Apr-2021 07:54:14

2K+ Views

In this post, we will understand the difference between Stack and HeapStackIt is a linear data structure.Memory is allocated in a contiguous (continuous) block.The memory for a stack is allocated and deallocated automatically using the instructions of the compiler.It costs less to build and maintain a stack.It is easy to ... Read More

Difference Between CLI and GUI

AmitDiwan

AmitDiwan

Updated on 16-Apr-2021 07:48:54

549 Views

In this post, we will understand the difference between CLI and GUI −CLIIt stands for Command Line Interface.It is difficult to use.It consumes less memory.It provides high precision.It is quick in comparison to GUI.The operating system of CLI required a keyboard only.The appearance can’t be modified.An input can be entered ... Read More

Difference Between RPC and RMI

AmitDiwan

AmitDiwan

Updated on 16-Apr-2021 07:47:26

4K+ Views

In this post, we will understand the difference between RPC and RMI −RPC (Remote Procedure Call)It is a library.It is an OS dependent platform.It supports procedural programming.It is less efficient in comparison to RMI.It creates more overhead.The parameters passed to RPC is normal data.It is the older version of RMI.It ... Read More

Difference Between Time Sharing and Real-Time Operating System

AmitDiwan

AmitDiwan

Updated on 16-Apr-2021 07:36:09

4K+ Views

In this post, we will understand the difference between Time Sharing and Real-Time Operating System −Time Sharing Operating SystemIn this type of operating system, a quick response is required to be given when a request comes in.It has a switching method.Any kind of modifications can be done to the program.The ... Read More

Advertisements