Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Node
- {
- Data *data;
- Node *next;
- }
- // this is efficient
- for (int i=0; i< n; i++)
- {
- strcat(str, data(i));
- }
- // this could be too, but you'd need to look at the implementation to be sure
- std::string str;
- for (int i=0; i<n; i++)
- {
- str+=data(i);
- }
- String result = "";
- for (int i = 1; i <= n; i++) {
- result = result + Integer.toString(i);
- }
- char *result = malloc(1);
- *result = '