he problem is this..
You are given two strings. Write an algorithm that creates a third string such that it contains both the given strings and it should be the smallest possible string. There is no condition regarding order of occurrence of given strings in the third string. Implement your algorithm in C++ using classes.
S2 = “loot”
S3 = “helloloot” //Incorrect as S3 is not the smallest possible string
b) S1= “hello”
S2 = “Delhi”
S3 = “helloDelhi” or “Delhihello”
so if you have the string "hello" and the string "loot" it would become "helloot" since the ending "lo" of hello and the beginning "lo" of loot are the same? and "helloeDelhi" hase no over lap so it isnt truncated correct?
This might get you started.
There are 2 string: stringA= hellow , stringB= owl
So what you got to do is take the first character of string B and iterate it over stringA from the ending. In this case, we take the character o from stringB and compare it with w
It does not match so move ahead to o. This one does match. So now you compare the 2 character of stringB that is w
OK, so HostGator for some reason no longer allows gcc/g++ access unless you have a Designated Server account, which is a lot of money to spend just to compile my "Hello World" program. Thus I figured I'd compile at home, then upload. Program is your regular old bare-bones Hello World ...
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...