Posts

Showing posts from September 18, 2025

52-Diamond Pattern Printing

Image

51 Adjacent pair not Equal

Image
Problem of the Day: Problem Statement You are given two strings s1 and s2 of equal length. Consider every adjacent pair of characters (substring of length 2) from both strings. Your task is to return all adjacent pairs where the pair in s1 is not equal to the pair in s2. Each result should be represented as "pair1-pair2".. 1.Input s1 = "abcdef" s2 = "abcfed" Output: ["d-f", "d-f", "f-d"]; 2.Input: s1 = "asdfghij" s2 = "adsfgijh" Output: ["sd-ds", "hij-ijh"] .snippet-thumbnail img { max-width: 50px; height: auto; object-fit: cover; }