Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
    Bookmark Topic Watch Topic
  • New Topic

Can The Solution of the problem which i have solved can be further more improvised

 
Rahul Shivsharan
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Report post to moderator
Given two strings, append them together (known as "concatenation") and return the result. However, if the concatenation creates a double-char, then omit one of the chars, so "abc" and "cat" yields "abcat".

conCat("abc", "cat") → "abcat"
conCat("dog", "cat") → "dogcat"
conCat("abc", "") → "abc" . ........ the code that i have written is as follows
 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please Use One Thread Per Question. You should have posted this in your previous post. Let's continue there; I'll put a link to this (now closed) thread.
 
    Bookmark Topic Watch Topic
  • New Topic