
ZA UNISA DSAR02 2015 free printable template
Get, Create, Make and Sign dsar02 - unisa ac



How to edit dsar02 - unisa ac online
Uncompromising security for your PDF editing and eSignature needs
ZA UNISA DSAR02 Form Versions
How to fill out dsar02 - unisa ac

To fill out dsar02, follow these steps:
Instructions and Help about dsar02 - unisa ac
Hello everyone and welcome to quick so geeks the problem which we have in hand today is that we will be given an array a and a number X, and we have to check for a pair in error a with the sum as X so as the input we will be given an array of n numbers and another number X, and we have to determine whether there exists two elements in a such that their sum is exactly equal to X so let us understand it with an example, so you are given this array here and the value of x is 16, so you have to have two elements in this array whose sum is exactly equal to 16 so 6 plus 10 so 6 and 10 are the two elements whose sum is exactly equal to 16 so their output should be these two numbers ok so let's look at the first method to solve this problem so the first method involves using sorting so as a first step what we do is we sort the array in on decreasing order by non-decreasing order we mean that it should be sorted in increasing order starting from the smallest element to the largest element then we initialize to index variables to find out the candidates in the sorted array so the index variables will be L and R so L here and our u so this will be initialized to 0 n size minus 1 so L is the index variable which is starting from the leftmost element of the array and R is starting from the rightmost element of the array now we are going to loop through the array, and we will go to check this condition that L should be smaller than R so while checking this condition we execute these 3 steps, so we check that if the sum of element at index L and R is equal to the variable sum it is equal to the variable sum then we return 1 which means that we have found out our two elements otherwise what we do is we compare the value of the sum of the elements at index L and R with the value sum and if the sum of these two elements is less than we increase the index L other ways to decrease the index are now why we do this we basically do this because as the sum of these two elements is not equal to the variable sum, so it will be the greater than the sum, or it will be less than the sum so two to get the sum of these elements closer to the variable sum what we need to do is we basically have to either increase the value of the of these two any of these two variables, or you have to decrease the value so if we check we compare the value with the variable sum so if it is needed that the value of the sum of these two elements should be increased then we basically do NL plus otherwise it is — — and we exploit the fact that the elements are sorted because we sorted them in the first step itself now if the while loop is done I've written through the whole of the array and fill it did not return one, so it means that there are no candidates in the whole array, so we return zero, so the time complexity of this solution will basically depend on what type of sorting algorithm we are using so if we use merge sort or each sort then the time complexity will be order of n log n I feel...
People Also Ask about
Is Unisa open for 2023 to 2024 applications?
How do I upload my banking details at Unisa?
Is Unisa still open for 2023 applications?
How to fill in Unisa postal address?
How do I upload documents to Unisa?
How do I upload my proof of payment to Unisa?
For pdfFiller’s FAQs
Below is a list of the most common customer questions. If you can’t find an answer to your question, please don’t hesitate to reach out to us.
How can I send dsar02 - unisa ac to be eSigned by others?
How do I edit dsar02 - unisa ac online?
How do I edit dsar02 - unisa ac on an Android device?
What is dsar02?
Who is required to file dsar02?
How to fill out dsar02?
What is the purpose of dsar02?
What information must be reported on dsar02?
pdfFiller is an end-to-end solution for managing, creating, and editing documents and forms in the cloud. Save time and hassle by preparing your tax forms online.
