Need help with नहीं placement
I can't figure out where नहीं should be placed in different sentences. Sometimes the correct solution is before the verb and other times it is after. Does the presence of an adverb or adjective change the correct position?
नहीं should always be adjacent to the verb it's negating.
No matter what postpositions, adverbs etc are present in the sentence, they cannot come between the नहीं and the verb. This rule is sometimes relaxed in colloquial spoken Hindi which is pretty lax on word order but must be followed in formal Hindi. For example there is no Hindi equivalent to the verb 'to like' and we instead use 'पसंद करना' (to do the liking). This has to be negated as 'पसंद नहीं करना' but it is very common to see 'नहीं पसंद करना' in spoken Hindi.
As for whether नहीं should come before or after the verb, both forms are valid though the latter emphasises the negation more than the former. However, नहीं cannot come after auxiliary verbs like होना/रहना. So, 'मैं नहीं जा रहा (हूँ)' and 'मैं जा नहीं रहा (हूँ)' are both correct but not 'मैं जा रहा नहीं (हूँ)' or 'मैं जा रहा हूँ नहीं'.
There are languages like German where the placement of the negation changes the meaning of the sentence in subtle ways. This is not just the emphasis, but the actual meaning, as the negation can affect specific, bigger or smaller parts of the sentence depending on where it is. Is it so in Hindi too?
Nicht ich lerne heute gerne auf Duolingo: it's not me who would be happy to learn on Duolingo today.
Ich lerne nicht heute gerne auf Duolingo: it's not today that I would be happy to learn on Duolingo.
Ich lerne heute nicht gerne auf Duolingo: I wouldn't be happy to learn on Duolingo today.
Ich lerne heute gerne nicht auf Duolingo: It's not on Duolingo that I would be happy to learn today.
Ich lerne heute gerne auf Duolingo nicht: I would be happy not to learn on Duolingo today.
बहुत शुकिया, LongTermLearner.
To answer your question, altering the meaning of a sentence by changing word-order is not done much in formal/written Hindi which would make these distinctions using subordinate clauses like in English. But something like this is pretty common in colloquial Hindi. In fact, it's not limited to the negation particle. Colloquial Hindi is very flexible with word-order. So, you can play around a lot with word order and inflexion to convey subtly different meanings.