The key to this algorithm is to compare each value with its previous value. If the previous value is larger than the current value, change currentVal= previous value and previousVal = currentVal (of course u will need a tempVal to store one of the value). The program should loop from first value til the very end and should only run once.
Answer:
Stack
Explanation:
Any function that call itself can be regarded as recursive function, it should be noted that Recursion is a natural use for a stack, especially in the area of book keeping.
Recursion is very important because some of problems are usually recursive in nature such as Graph and others, and when dealing with recursion , only base and recursive case is needed to be defined.
Some areas where recursion is used are in sorting and searching.
Employing someone based on gender is unlawful because, it is the skill which matters to get the required job done and skills are not based on gender. There is no evidence that this particular gender cannot do this job and this particular gender can do. Everyone who posses the required skillsets are eligible to get employed irrespective of gender.
===============================================
I tried my best
Answer:
i don't know..
..goo gle it ...............
Answer:
Below is the required code:
Explanation:
Python Code
import os
import bin
dir = input("Please specify the location to the directory")
list = os.walk(dir)
a = length(list[1])
b = length(list[2])
print "Files: %n , Sub-dirs : %n" % (b,a)
decision = _(" Do you want to continue? (y/n) "))
if(decision):
cls
else :
exit()