Answer:
39
Explanation:
Since each of the address occupies only 1 memory cell and the 2-D array is row-major 2-D array.So the elements will be filled row wise.First the first row will be fully filled after that second row and so on.Since we want the address of the element at third row and fourth column.
we can generalize this :
address of the element at ith row and jth column=s + ( c * ( i - 1 ) + ( j - 1 ) ).
s=Starting address.
c=Number of columns in the 2-D array.
address=20+(8*(3-1)+(4-1))
=20+(8*2+3)
=20+16+3
=39
Or you can make a matrix of six rows and eight columns and put first cell with 20.Start filling the elements row wise one by one and look what is the count of 3rd row and 4th column.
Sample Run
Enter a text: Good morning Good afternoon Good evening
Good afternoon evening morning
The programreturns uniqueelements in the string passed in with no duplicates. The programis written in python 3 thus :
text = input('Enter text : ')
#promptsuserto enterstring inputs
split_text = text.split()
#splitinputtedtext basedonwhitespace
unique = set(split_text)
#usingtheset function,takeonlyuniqueelementsin thestring
combine = ' '.join(unique)
#usethejoinfunctiontocombinethestringstoformasingle lengthstring.
print(combine)
Asamplerunoftheprogramisattached
Learn more : brainly.com/question/15086326
Answer:
The program to this question as follows:
Program:
value = input("Input text value: ") #defining variable value and input value by user
word = value.split() #defining variable word that split value
sort_word = sorted(word) #defining variable using sorted function
unique_word = [] #defining list
for word in sort_word: #loop for matching same value
if word not in unique_word: #checking value
unique_word.append(word) #arrange value using append function
print(' '.join(unique_word)) #print value
Output:
Input text value: Good morning Good afternoon Good evening
Good afternoon evening morning
Explanation:
In the above python code, a value variable is defined that uses input function to input value from the user end, and the word variable is declared, which uses the split method, which split all string values and defines the sort_word method that sorted value in ascending order.
crab
b.
web robot
c.
database
d.
runner
Answer: B) Web robot
Explanation:
Web robot or spider is the search engine program which automatically visit the new web site and update the information. Basically, it is the internet bot that helps in store the information from the search engine to the index.
Spider searches the web site and read the information in their given page for creating the entries from search engine.
Web robot is also known as web crawler, this type of programs are use by different search engine that automatically download and update the web content on web sites.
believe she will qualify for need based assistance. What advice would you give Anna?
Since Anna does not believe she will qualify for need based assistance, the advice that I would give Anna is that she should be hopeful and not worry and then I will tell her also that since her parents cannot afford the fees, then she is more than qualified for it.
If you have a financial need and meet other eligibility requirements, you may be eligible for need-based funding. More need-based aid than what you actually need is not permitted.
Therefore, the best advice one can give a person who is having financial issues is that they need to be confidence and also have the courage to believe that when they source for college funds, they will get it.
Learn more about assistance from
Answer:
The different variable in C is 21213316700.
Explanation:
Given value:
Total value = letters + underscore value
Total value = 52 + 1
Total value =53
choice for first character = 53 letters +10 digits
first character = 63
choice for remaining characters
So,
Variable number With one 1 character = 53
Variable number With 2 character = 53 × 63
Variable number With 3 character = 53 × 63²
Variable number With 4 character = 53 × 63³
.
.
.
Variable number With 7 character =
Total difference variable = 53 + 53 × 63+ 53 × 63²+ 53 × 63³+....+
Total difference variable = 53(1 + 63 + 63²+ 63³+ .... + )
Formula:
Total difference variable
(b) Selection-sort on a sequence of size n.
(c) Merge-sort on a sequence of size n.
(d) Radix sort on a sequence of n integer keys, each in the range of[ 0, (n^3) -1]
(e) Find an element in a red-black tree that has n distinct keys.
Answer:
Answers explained below
Explanation:
(a) Construction of a heap of size n , where the keys are not known in advance.
Worst Case Time complexity - O(n log n)
Two procedures - build heap, heapify
Build_heap takes O(n) time and heapify takes O(log n) time. Every time when an element is inserted into the heap, it calls heapify procedure.
=> O(n log n)
(b) Selection-sort on a sequence of size n.
Worst Case Time complexity - O(n^2)
Selection sort finds smallest element in an array repeatedly. So in every iteration it picks the minimum element by comparing it with the other unsorted elements in the array.
=> O(n^2)
(c) Merge-sort on a sequence of size n.
Worst Case Time complexity - O(n log n)
Merge sort has two parts - divide and conquer. First the array is divided (takes O(1) time) into two halves and recursively each half is sorted (takes O(log n) time). Then both halves are combines (takes O(n) time).
=> O(n log n)
(d) Radix sort on a sequence of n integer keys, each in the range of[ 0 , (n^3) -1]
Worst Case Time complexity - O (n log b (a))
b - base of the number system, a - largest number in that range, n - elements in array
Radix sort is based on the number of digits present in an element of an array A. If it has 'd' digits, then it'll loop d times.
(e) Find an element in a red-black tree that has n distinct keys.
Worst Case Time complexity - O (log n)
Red-black tree is a self-balancing binary tree => The time taken to insert, delete, search an element in this tree will always be with respect to its height.
=> O(log n)