Time complexity of rotation array m times using temporary array

I am new to asymptotic analysis, on solving the array rotation problem on geeksforgeeks the first solution provided was using a temporary array, I tried implementing this logic and found that the space complexity is O(m) where m is the number of times the array needs to be rotated. But the time complexity is given as O(n) where n is the size of the array. But I found that the time complexity should be O(n+m)

Input arr[] = [1, 2, 3, 4, 5, 6, 7], m = 2, n =7 1) Store d elements in a temp array     temp[] = [1, 2] // It takes m iterations to copy the array 2) Shift rest of the arr[]    arr[] = [3, 4, 5, 6, 7, 6, 7] // n-m iteration for shifting 3) Store back the d elements    arr[] = [3, 4, 5, 6, 7, 1, 2] // m iterations for storing the elements back 

Here is how I calculated time complexity

=> m+(n-m)+m  => O(n+m) 

Can anyone help me to figure out what I am doing wrong?

What % of unique users visited a page (1 or more times)?

I have a chat feature on my site, which some of my users LOVE, and some don’t use at all. I’d like to know how many of my users visited the chat page (% of total unique users, I guess).

For example: if I had 10 users on my site last month and 3 of them each visited chat 10 times, while 7 of them never went to chat at all, I want to know that 3 people used the chat page (not that that the /chat page had 30 entries).

How can I get that?

How to fix target packages (stable/binary-amd64/Packages) is configured multiple times

W: Target Packages (stable/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list.d/docker.list:1 W: Target Packages (stable/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list.d/docker.list:1 W: Target Translations (stable/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list.d/docker.list:1 W: Target Translations (stable/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list.d/docker.list:1 W: Target DEP-11 (stable/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list.d/docker.list:1 W: Target DEP-11 (stable/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list.d/docker.list:1 W: Target DEP-11-icons-small (stable/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list.d/docker.list:1 W: Target DEP-11-icons (stable/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list.d/docker.list:1 W: Target CNF (stable/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list.d/docker.list:1 W: Target CNF (stable/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list.d/docker.list:1 W: Target Packages (stable/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list.d/docker.list:1 W: Target Packages (stable/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list.d/docker.list:1 W: Target Translations (stable/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list.d/docker.list:1 W: Target Translations (stable/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list.d/docker.list:1 W: Target DEP-11 (stable/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list.d/docker.list:1 W: Target DEP-11 (stable/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list.d/docker.list:1 W: Target DEP-11-icons-small (stable/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list.d/docker.list:1 W: Target DEP-11-icons (stable/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list.d/docker.list:1 W: Target CNF (stable/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list.d/docker.list:1 W: Target CNF (stable/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list.d/docker.list:1 

When I run sudo apt update. I was trying to to blockchain so installed Dockers, How can I remove the lists which are configures multiple times?

Ubuntu only boots correctly one out of four times

I have a Lenovo W530 Thinkpad (with an nVidia k2000 GPU). I recently dual booted Windows 10 and Ubuntu 18.04.

Every time I restart I see the GRUB menu as expected. However, I am only able to boot into Ubuntu one out of about four times. The other 3/4 of the time it just freezes (very annoying).

After pressing enter on Ubuntu one of the following will happen:

  • It freezes on a purple screen (see picture) (this lasts indefinitely) enter image description here

  • It freezes with a cursor blinking very fast in the upper left corner (this lasts indefinitely, happens the most often and sometimes the screen backlight turns off and the cursor still blinks): enter image description here

  • Gibberish about a kernel panic is printed to the screen (this lasts indefinitely, happens least often): enter image description here

In all of these situations pressing ctl + alt + (f1-f12) does nothing.

Because I know nVidia drivers sometimes cause this, here is my graphics drivers setup: enter image description here

I have tried using boot-repair (this makes no difference) and I have tried reinstalling Ubuntu twice (this makes no difference).

Please help this is so annoying.

Thank you

Does the UA Oath of Treachery paladin’s Cull the Herd ability (from the Aura of Treachery feature) have a limit on the number of times it can be used?

The UA Oath of Treachery paladin (from Unearthed Arcana: Paladin) gets the Aura of Treachery feature at 7th level, which gives them this benefit (in addition to another one, Treacherous Strike):

Cull the Herd. You have advantage on melee attack rolls against any creature that has one or more of its allies within 5 feet of it.

It does not specify for how long this ‘advantage’ lasts. Its wording, unlike Treacherous Strike, does not imply any exact limit on the number of times that one may utilise this ability – only a condition in which the advantage takes place.

The “you may use this ability up to three times per short rest” that comes immediately after Treacherous Strike also seems to support that Treacherous Strike is, by RAW, limited in its usage, which is further reinforced by Treacherous Strike’s own text.

Thus I believe that Cull the Herd doesn’t have a limit on the number of uses it has by RAW, but am wondering whether or not this interpretation is correct.

Can Captain Othelstan use Tiamat’s Blessing of Retribution multiple times?

Captain Othelstan’s stat block describes this benefit:

Tiamat’s Blessing of Retribution. When Othelstan takes damage that reduces him to 0 hit points, he immediately regains 20 hit points. If he has 20 hit points or fewer at the end of his next turn, he dies.

For example, let’s say Othelstan hits 0 HP and his Blessing heals him back to 20 HP. If a Cult healer heals him above 20 HP, he would survive. I think that’s what it clearly state.

But what if he drops to 0 HP again, would the Blessing heal him again and could the healer then heal him again to keep him going repeatedly?

I know that as the DM, I can make it work however I’d like to make it work within my story, but I’m wondering how others generally understand this power.