Implementing a string class in C++
Your version

String&amp; operator=(String other)
{
   std::swap(m_data, other.m_data);
   return *this;
}


is


Exception safe
Correct (assuming that copy and move constructors are implemented correctly)
Fairly efficient in C++11 if the move constructor is implemented
Potentially slightly less efficient than implementing separate copy &amp; move constructors


The interviewer's version

String&amp; operator=(const String&amp; other)
{
   if (this != &amp;other)
   {
     delete[] m_data;
     m_data = new char[strlen(other.m_data) + 1] {'\0'};
     strcpy(m_data, other.m_data);
     return *this;
   } 
} 


is terrible, for the following reasons:


If allocation fails, m_data becomes a dangling pointer and destruction (or another assign) will lead to a double delete.
If this == &amp;other it doesn't return a value and therefore leads to undefined behavior (again).
Will fail if other.m_data == 0 (this might be ok if null strings are disallowed, but that would make even weak exception safety complicated)
Less seriously, it might lead to the content of m_data being initialized twice (depending on the optimizer and it's knowledge of strcpy)
Cannot be extended to support C++11 by implementing only an additional move constructor.


Furthermore, the style could be improved as well:


By using an early return instead of a long indented block
By not using C-style strings (and having a length member instead, although your version is presumably implemented in the same way as only m_data is swapped)
strlen and strcpy are not prefixed with std:: which they should be in C++ (having strlen and strcpy in the global namespace is allowed but not required by the standard.


A fixed version (still using a C-style representation) might look as follows:

String&amp; operator=(const String&amp; other)
{
   if(this == &amp;other)
      return *this;

   delete[] m_data;
   m_data = 0; // weak exception safety, which might be sufficient, but only if null strings are allowed, complicating the following code

   if(!other.m_data) // strlen will fail if other.m_data == 0
      return *this;

   std::size_t length = std::strlen(other.m_data);
   m_data = new char[length + 1];
   std::memcpy(m_data, other.m_data, length + 1);

   return *this;
}