Answer:
Algorithm explained below
Explanation:
Algorithm to check duplicate when list of element is sorted:
CheckDuplicate( Sorted list )
initialize count = 0
Repeat untill we reach on end of list :
if next is not end of list and current element is equal to next element
count = count+1
increase the pointer to next untill a different element is found
end CheckDuplicate
Worst Case Time Complexity will be O(n). Because there is only one iteration over the list will be performed.
Yes We have improved the worst case time complexity compared to previous question.
Actually after applying sorting all the similar element to will be next to each other.Then we will start iterating one by one from one side and check which is similar to next.If a different element will be find then we will check whether it's next is similar to it or not.
eg. 1 1 1 2 2 2 4 4 4 we can check duplicate in one iteration.
Answer:
c. sudo grep "charlie" /var/log/vsftpd.log
Explanation:
- sudo is used to access /var/log files since it requires superuser access
- grep command is used to search for a string of characters in a specified file
- "charlie" is the string searched in the log files
- /var/log/ is where the log files are in linux systems
If someone wants to use a wireless keyboard and mouse with a laptop computer, below are the steps.
First check if there’s a USB receiver attached to the mouse or keyboard. If there is, see below steps.
1. Connect the USB receiver of both mouse and keyboard into the USB port of your laptop computer. Some USB dongle would ask you to install or add it your device, just click OK and then add.
2. Make sure that the batteries on your wireless keyboard and mouse are working. And also check if the keyboard and mouse are turned on or have power.
3. Check if there’s a “connected” indication for both wireless mouse and keyboard on your laptop. You can now use your wireless mouse and keyboard on your laptop.
If there’s no USB receiver, and you’re using a bluetooth wireless mouse and keyboard, below are some steps to follow.
1. Turn on bluetooth connection on your laptop.
2. Make sure that batteries are working and turn on both wireless mouse and keyboard.
3. On your laptop, find your wireless mouse and keyboard under bluetooth option and connect the devices. You can now use your wireless bluetooth mouse and keyboard for laptop.
Answer:
Press the Windows key on your keyboard. In the box that appears, type Ease of Access mouse settings and press Enter . In the Mouse Keys section, toggle the switch under Use numeric pad to move mouse around the screen to On. Press Alt + F4 to exit this menu.