Skip to content

Instantly share code, notes, and snippets.

View manwar's full-sized avatar
✌️
Undercover Contributor

Mohammad Sajid Anwar manwar

✌️
Undercover Contributor
View GitHub Profile
@manwar
manwar / pwc-375.md
Created May 8, 2026 09:35
The Weekly Challenge - 375

The Weekly Challenge - 375

Early Bird Club members ONLY

Task 1: Single Common Word

Submitted by: Mohammad Sajid Anwar

You are given two array of strings.

Write a script to return the number of strings that appear exactly once in each of the two given arrays. String comparison is case sensitive.

@manwar
manwar / pwc-374.md
Last active May 8, 2026 22:37
The Weekly Challenge - 374

The Weekly Challenge - 374

Early Bird Club members ONLY

Task 1: Count Vowel

Submitted by: Mohammad Sajid Anwar

You are given a string.

Write a script to return the all possible vowel substrings in the given string. A vowel substring is a substring that only consists of vowels and has all five vowels present in it.

@manwar
manwar / pwc-373.md
Last active May 8, 2026 22:41
The Weekly Challenge - 373

The Weekly Challenge - 373

Early Bird Club members ONLY

Task 1: Equal List

Submitted by: Mohammad Sajid Anwar

You are given two arrays of strings.

Write a script to return true if the two given array represent the same strings otherwise false.

@manwar
manwar / pwc-372.md
Created April 28, 2026 15:35
The Weekly Challenge - 372

The Weekly Challenge - 372

Early Bird Club members ONLY

Task 1: Rearrange Spaces

Submitted by: Mohammad Sajid Anwar

You are given a string text of words that are placed among number of spaces.

Write a script to rearrange the spaces so that there is an equal number of spaces between every pair of adjacent words and that number is maximised. If you can't distribute, place the extra speaces at the end. Finally return the string.

@manwar
manwar / pwc-371.md
Last active April 21, 2026 23:37
The Weekly Challenge - 371

The Weekly Challenge - 371

Early Bird Club members ONLY

Task 1: Missing Letter

Submitted by: Reinier Maliepaard

You are given a sequence of 5 lowercase letters, with one letter replaced by '?'. Each letter maps to its position in the alphabet ('a = 1', 'b = 2', ..., 'z = 26'). The sequence follows a repeating pattern of step sizes between consecutive letters. The pattern is either a constant step (e.g., '+2, +2, +2, +2') or a simple alternating pattern of two distinct steps (e.g., '+2, +3, +2, +3').

Example 1

@manwar
manwar / pwc-370.md
Last active April 17, 2026 17:13
The Weekly Challenge - 370

The Weekly Challenge - 370

Early Bird Club members ONLY

Task 1: Popular Word

Submitted by: Mohammad Sajid Anwar

You are given a string paragraph and an array of the banned words.

Write a script to return the most popular word that is not banned. It is guaranteed there is at least one word that is not banned and the answer is unique. The words in paragraph are case-insensitive and the answer should be in lowercase. The words can not contain punctuation symbols.

@manwar
manwar / pwc-369.md
Last active April 10, 2026 21:53
The Weekly Challenge - 369

The Weekly Challenge - 369

Early Bird Club members ONLY

Task 1: Valid Tag

Submitted by: Mohammad Sajid Anwar

You are given a given a string caption for a video.

Write a script to generate tag for the given string caption in three steps as mentioned below:

@manwar
manwar / pwc-368.md
Last active March 31, 2026 17:05
The Weekly Challenge - 368

The Weekly Challenge - 368

Early Bird Club members ONLY

Task 1: Make it Bigger

Submitted by: Mohammad Sajid Anwar

You are given a given a string number and a character digit.

Write a script to remove exactly one occurrence of the given character digit from the given string number, resulting the decimal form is maximised.

@manwar
manwar / pwc-367.md
Created March 23, 2026 11:14
The Weekly Challenge - 367

The Weekly Challenge - 367

Early Bird Club members ONLY

Task 1: Max Odd Binary

Submitted by: Mohammad Sajid Anwar

You are given a binary string that has at least one '1'.

Write a script to rearrange the bits in such a way that the resulting binary number is the maximum odd binary number and return the resulting binary string. The resulting string can have leading zeros.

@manwar
manwar / pwc-366.md
Last active March 17, 2026 17:05
The Weekly Challenge - 366

The Weekly Challenge - 366

Early Bird Club members ONLY

Task 1: Count Prefixes

Submitted by: Mohammad Sajid Anwar

You are given an array of words and a string (contains only lowercase English letters).

Write a script to return the number of words in the given array that are a prefix of the given string.