A number of other answers have said that you should follow the coding standard for your project. Consistency is the holy grail here. Mixing code styles that follow different rules is highly error prone
Having said that, Steve McConnell pointed out in his great book "Code Complete", using the construct
if ( i < j )
arr[ i ] = sum ;
has the problem that it is prone to error during maintenance. Should you need to add some other statement to be performed when (i<j) is true then you have to add both the statement(s) and some surrounding braces. It is all too easy to write
if ( i < j )
arr[ i ] = sum ;
sum += j ;
when you really meant
if ( i < j )
{
arr[ i ] = j ;
sum += j ;
}
Having the surrounding braces there for ALL conditional or loop constructs makes for greater consistency and makes it easier to scan over the code and check that all of the loops follow the same pattern.