[LeetCode: reverse a string] (https://leetcode.com/problems/reverse-string/)
NSString* reverseString(NSString *originalString)
{
// use a new string to append the chars from the old one
NSString *newString = @"";
for (int i = originalString.length-1; i >-1; i--) {
// get the substirng to append
NSString *charString = [originalString substringWithRange:NSMakeRange(i,1)];
// append to the new string
newString = [NSString stringWithFormat:@"%@%@", newString,charString];
}
return newString
}
Congratulations @nbfuhao! You have received a personal award!
Click on the badge to view your own Board of Honor on SteemitBoard.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations @nbfuhao! You received a personal award!
Click here to view your Board
Vote for @Steemitboard as a witness and get one more award and increased upvotes!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations @nbfuhao! You received a personal award!
You can view your badges on your Steem Board and compare to others on the Steem Ranking
Do not miss the last post from @steemitboard:
Vote for @Steemitboard as a witness to get one more award and increased upvotes!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit