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-352.md
Last active December 9, 2025 19:09
The Weekly Challenge - 352

The Weekly Challenge - 352

Early Bird Club members ONLY

Task 1: Match String

Submitted by: Mohammad Sajid Anwar

You are given an array of strings.

Write a script to return all strings that are a substring of another word in the given array in the order they occur.

@manwar
manwar / pwc-351.md
Created December 4, 2025 15:26
The Weekly Challenge - 351

The Weekly Challenge - 351

Early Bird Club members ONLY

Task 1: Special Average

Submitted by: Mohammad Sajid Anwar

You are given an array of integers.

Write a script to return the average excluding the minimum and maximum of the given array.

@manwar
manwar / pwc-350.md
Last active November 27, 2025 00:45
The Weekly Challenge - 350

The Weekly Challenge - 350

Early Bird Club members ONLY

Task 1: Good Substrings

Submitted by: Mohammad Sajid Anwar

You are given a string.

Write a script to return the number of good substrings of length three in the given string.

@manwar
manwar / pwc-349.md
Created November 19, 2025 02:07
The Weekly Challenge - 349

The Weekly Challenge - 349

Early Bird Club members ONLY

Task 1: Power String

Submitted by: Mohammad Sajid Anwar

You are given a string.

Write a script to return the power of the given string.

@manwar
manwar / pwc-348.md
Last active November 12, 2025 16:20
The Weekly Challenge - 348

The Weekly Challenge - 348

Early Bird Club members ONLY

Task 1: String Alike

Submitted by: Mohammad Sajid Anwar

You are given a string of even length.

Write a script to find out whether the given string can be split into two halves of equal lengths, each with the same non-zero number of vowels.

@manwar
manwar / pwc-347.md
Created November 3, 2025 10:58
The Weekly Challenge - 347

The Weekly Challenge - 347

Early Bird Club members ONLY

Task 1: Format Date

Submitted by: Mohammad Sajid Anwar

You are given a date in the form: 10th Nov 2025.

Write a script to format the given date in the form: 2025-11-10 using the set below.

@manwar
manwar / pwc-346.md
Last active November 2, 2025 13:41
The Weekly Challenge - 346

The Weekly Challenge - 346

Early Bird Club members ONLY

Task 1: Longest Parenthesis

Submitted by: Mohammad Sajid Anwar

You are given a string containing only ( and ).

Write a script to find the length of the longest valid parenthesis.

@manwar
manwar / pwc-345.md
Last active October 20, 2025 16:10
The Weekly Challenge - 345

The Weekly Challenge - 345

Early Bird Club members ONLY

Task 1: Peak Positions

Submitted by: Mohammad Sajid Anwar

You are given an array of integers, @ints.

Find all the peaks in the array, a peak is an element that is strictly greater than its left and right neighbours. Return the indices of all such peak positions.

@manwar
manwar / pwc-344.md
Last active October 16, 2025 08:41
The Weekly Challenge - 344

The Weekly Challenge - 344

Early Bird Club members ONLY

Task 1: Array Form Compute

Submitted by: Mohammad Sajid Anwar

You are given an array of integers, @ints and an integer, $x.

Write a script to add $x to the integer in the array-form.

@manwar
manwar / pwc-343.md
Last active October 13, 2025 04:58
The Weekly Challenge - 343

The Weekly Challenge - 343

Early Bird Club members ONLY

Task 1: Zero Friend

Submitted by: Mohammad Sajid Anwar

You are given a list of numbers.

Find the number that is closest to zero and return its distance to zero.