I say no way possible, WWI U-boats were short range and this was 2 years before WWI. The first diesel engine was fitted in a U-boat in 1912 and they were capable of short trips in the North Sea only. They were never as far west as the Titanic when she sank, not even 6 years later when WWI concluded. Also, Titanic sank in 1912, two years before WWI. No German captain would attack a ship in peacetime. He's not a kid in the backyard with a slingshot.