Will the potential energy is same in both the cases? Suppose there is a charge $Q$. Now bring in another charge $Q'$ from infinity to a position a distance $r$ from charge $Q$. Then the change in potential energy is equal to $kQQ'/r$.
My question is: will the potential energy will be same if the same charge $Q'$ is brought from infinity to a distance $r$ from $Q$, but in small portions $dQ'$.  I mean that the first $dQ'$ is brought to a distance $r$ from $Q$, and then additional incremental charges $dQ'$ are also brought to the separation $r$, and so on.
Will the potential energy will be same in both cases?
 A: It will be the same only if you ignore the electric field of the dQ's that you moved there first, that is, you only consider the electric field of the original charge Q at the origin. Otherwise you would be including in the calculation the self energy of the electric charge Q', which is infinite. the self energy is the energy required to put a charge Q' together from dQ's coming from infinity.
A: Short answer: Not really.
The answer is slightly different when talking about point charges vs distributons.
Given I have some charge distribution  $\rho_{1}$ and some other charge distribution $\rho_{2}$ that produces a potential $V_{2}$
The potential energy between the 2 distributions [not the same thing as the total potential energy of the whole distribution] is given as the following:
$$\iiint V_{2} \rho_{1} dv $$
Aka building up  distribution 1 in the presence of potential 2. This represents the potential energy between the 2 distributions.
Moving the distribution 1 to its location, as a whole, or as individual $\rho_{1} dv$  elements yield the same result. The potential energy between the distributions is invariant to the proccess, just the final state.
Now... this kind of goes out the window for point charges, sort of.
Point charges cannot be broken up into individual elements, so the question about multiple "dq" of a point charge doesn't really make sense. With that being said, a point charge has a single "dq" element, That is $Q\delta^3(\vec{r}-\vec{r}_{0}) dv$ Plugging it into our formula gives the same result, the potential energy between the distributions is invariant to  how you  arrive at the final distribution.
Edit:
This is also the same for  total field energy , moving it as a whole requires you to build to distribution in the first place adding work in overcoming the electrostatic forces of itself.  Then overcoming the forces from the other charges. Or alternatively, moving the charge piece by piece taking into account that the amount of work required to move each charge increases as you now need to overcome the forces of the placed charge.
Both of these methods yield the same total field energy
[May comment on the false infinite energy of a point charge later]
A: I would think no, it wouldn't be the same.
Having two charges already in position would alter the magnitude of the potential field for all the incoming charges- so it would require more or less work to move subsequent charges to the desired location.
