Answer: (A) Computer networks allow individuals to share many types of resources.
Explanation:
Computer network is basically known as digital telecommunication that allowing various nodes to sharing different types of resources in the network. In the computer network, the data link is establish over the cable like wire and optic media in the network.
The network basically allow sharing of the computing network and various types of resources in the networking.
It can allow sharing resources like printers, exchange files and CDs. There are mainly two types of networking that are: LAN and WAN.
Answer:
B.O(1)
Explanation:
When we are implementing ADT stack using linked chain we can pop an entry from the stack having O(1) time complexity because in linked chain we have the head or top pointer in linked chain only.Popping and pushing in stack happens on only one end that is top.So we have move to move top in linked chain to the next and delete prev node.
Answer:
import numpy as np
def sample_median(n, P):
return np.median( np.random.choice ( np.arange (1, len(P) + 1 ), n, p = P ) )
print(sample_median(10,[0.1 0.2 0.1 0.3 0.1 0.2]))
print(sample_median(10,[0.1 0.2 0.1 0.3 0.1 0.2]))
print(sample_median(5, [0.3,0.7])
print(sample_median(5, [0.3,0.7])
Explanation:
- Bring in the numpy library to use the median function provided by the numpy library.
- Define the sample_median function that takes in 2 parameters and returns the median with the help of built-in random, choice and arrange functions.
- Call the sample_median function by providing some values to test and then display the results.
Output:
4.5
4.0
2.0
1.0
Related Articles. Scanner is a class in java. util package used for obtaining the input of the primitive types like int, double, etc. and strings.