- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 210 Articles for Analysis of Algorithms
![Arnab Chakraborty](https://www.tutorialspoint.com/assets/profiles/123881/profile/60_2940367-1661162113.png)
574 Views
In this section we will see another representation of multidimensional arrays. Here we will see the Array of Arrays representation. In this form, we have an array, that is holding the starting addresses of multiple arrays. The representation will be look like this.This is a two-dimensional array x of size [7 x 8]. Each row is represented as a single onedimensional array. The initial array is holding the addresses of these single arrays. They are array of addresses, so we can say that, it is an array of pointers. Each pointer is holding addresses of another arrays.create this kind of ... Read More
![Arnab Chakraborty](https://www.tutorialspoint.com/assets/profiles/123881/profile/60_2940367-1661162113.png)
1K+ Views
As we know the arrays are homogeneous by definition. So we have to put data of same type in an array. But if we want to store data of different type, then what will be the trick? In C like old languages, we can use unions to artificially coalesce the different types into one type. Then we can define an array on this new type. Here the kind of object that an array element actually contains is determined by a tag. Let us see one structure like this −struct Vehicle{ int id; union { Bus ... Read More
![Arnab Chakraborty](https://www.tutorialspoint.com/assets/profiles/123881/profile/60_2940367-1661162113.png)
1K+ Views
Sometimes we create array using dynamic memory allocation. If the array is allocated using dynamic memory allocation technique, we can double the size of array by performing some operations.Suppose initial array size was 5.Array01234Element 1Element 2Element 3Element 4Element 5After array doubling, the size is −0123456789Element 1Element 2Element 3Element 4Element 5Element 6Element 7Element 8Element 9Element 10To double the size of array arr of size n, arr[0…n-1]. At first we have to create one new array of size say m. Then copy n elements from arr to the new array. Finally change the value of arr to point to the new array.To ... Read More
![Arnab Chakraborty](https://www.tutorialspoint.com/assets/profiles/123881/profile/60_2940367-1661162113.png)
4K+ Views
Here we will see how to use substitution method to solve recurrence relations. We will take two examples to understand it in better way.Suppose we are using the binary search technique. In this technique, we check whether the element is present at the end or not. If that is present at middle, then the algorithm terminates, otherwise we take either the left and right subarray from the actual array again and again. So in each step the size of the array decreases by n / 2. Suppose the binary search algorithm takes T(n) amount of time to execute. The base ... Read More
![Arnab Chakraborty](https://www.tutorialspoint.com/assets/profiles/123881/profile/60_2940367-1661162113.png)
956 Views
During analysis of algorithms, we find some recurrence relations. These recurrence relations are basically using the same function in the expression. In most of the cases for recursive algorithm analysis, and divide and conquer algorithm we get the recurrence relations.Here we will see one example of recurrence equation by the help of some examples. Suppose we are using the binary search technique. In this technique, we check whether the element is present at the end or not. If that is present at middle, then the algorithm terminates, otherwise we take either the left and right subarray from the actual array ... Read More
![Arnab Chakraborty](https://www.tutorialspoint.com/assets/profiles/123881/profile/60_2940367-1661162113.png)
182 Views
In algorithm analysis we count the operations and steps. This is basically justified when computer takes more time to perform an operation than they took to fetch the data needed for that operation. Nowadays the cost of performing an operation is significantly lower than the cost of fetching data from memory.The run time of many algorithms is dominated by the number of memory references (number of cache misses) rather than by the number of operations. So, when we will try to desing some algorithms, we have to focus on reducing not only the number of operations but also the number ... Read More
![Arnab Chakraborty](https://www.tutorialspoint.com/assets/profiles/123881/profile/60_2940367-1661162113.png)
3K+ Views
There are different methods to estimate the cost of some algorithm. One of them by using the operation count. We can estimate the time complexity of an algorithm by choosing one of different operations. These are like add, subtract etc. We have to check how many of these operations are done. The success of this method depends on our ability to identify the operations that contribute most of the time complexity.Suppose we have an array, of size n [0 to n - 1]. Our algorithm will find the index of largest element. We can estimate the cost by counting number ... Read More
![sudhir sharma](https://www.tutorialspoint.com/assets/profiles/125719/profile/60_65058-1565947418.jpg)
4K+ Views
Back Off Algorithm is an algorithm used for collision resolution. It works as, When this collision occurs, both the devices wait for a random amount of time before retransmitting the signal again, they keep on trying until the data is transferred successfully. This is called back off, since the nodes ‘back-off’ for a certain amount of time, before they try to re-access it again. This random amount of time is directly proportional to the number of attempts it has made to transmit the signal.AlgorithmBelow is a simple flowchart to explain the Back Off Algorithm in brief.As can be seen, that ... Read More
![Kiran Kumar Panigrahi](https://www.tutorialspoint.com/assets/profiles/390736/profile/60_2598-1635242143.png)
10K+ Views
Both Block cipher and Stream cipher belong to the family of symmetric key ciphers which are the basically encryption methods primarily used for converting the plaintext into ciphertext directly.Go through this article to find out more about the features of block ciphers and stream ciphers and how they are different from each other.What is Block Cipher?A block cipher is a symmetric cryptographic technique that uses a shared, secret key to encrypt a fixed-size data block. During encryption, plaintext is used, and ciphertext is the resultant encrypted text. The plaintext and ciphertext are both encrypted using the same key.A block cipher ... Read More
![Kiran Kumar Panigrahi](https://www.tutorialspoint.com/assets/profiles/390736/profile/60_2598-1635242143.png)
18K+ Views
In the context of programming, an Algorithm is a set of well-defined instructions in sequence to perform a particular task and achieve the desired output. Here we say "a set of defined instructions" which means that somewhere the user knows the outcome of those instructions if they get executed in the expected manner. On the basis of the knowledge about outcome of the instructions, there are two types of algorithms namely, Deterministic and Non-deterministic Algorithms. Read this article to learn more about deterministic and non-deterministic algorithms and how they are different from each other. What is Deterministic Algorithm? A deterministic ... Read More