menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Data Science News

>

Leetcode 1...
source image

Medium

3d

read

275

img
dot

Image Credit: Medium

Leetcode 1768. Merge Strings Alternately | Step by step solution for beginners

  • Merge two given strings word1 and word2 by adding letters alternately.
  • If one string is longer than the other, append the additional letters to the end of the merged string.
  • Increment pointers for each string and add characters alternately to the final result.
  • Complexity: O(max(N, M)), O(N)

Read Full Article

like

16 Likes

For uninterrupted reading, download the app