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-383.md
Created July 14, 2026 20:25
The Weekly Challenge - 383

The Weekly Challenge - 383

Early Bird Club members ONLY

Task 1: Similar List

Submitted by: Mohammad Sajid Anwar

You are given three list of strings.

Write a script to find out if the first two list are similar with the help the third list. The third list contains the similar words map.

@manwar
manwar / pwc-382.md
Last active July 12, 2026 15:32
The Weekly Challenge - 382

The Weekly Challenge - 382

Early Bird Club members ONLY

Task 1: Hamiltonian Cycle

Submitted by: Peter Campbell Smith

You are given a target number.

Write a script to arrange all the whole numbers from 1 up to the given target number into a circle so that every pair of side-by-side numbers adds up to a perfect square. Please make sure, the last number and the first must also add up to a square.

@manwar
manwar / sql-join.t
Last active July 2, 2026 20:02
Using SQL JOIN with DBIx::Class.
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use List::Util qw(first);
#
# lib/
@manwar
manwar / cache-hit-cache-miss.pl
Created July 1, 2026 09:37
Benchmark Cache hit and Cache miss.
#!/usr/bin/env perl
use strict;
use warnings;
use Benchmark qw(cmpthese);
print "Generating 1000x1000 matrix...\n";
my @nums;
for my $r (0 .. 999) {
for my $c (0 .. 999) {
@manwar
manwar / pwc-381.md
Last active June 30, 2026 22:43
The Weekly Challenge - 381

The Weekly Challenge - 381

Early Bird Club members ONLY

Task 1: Same Row Column

Submitted by: Mohammad Sajid Anwar

You are given a n x n matrix containing integers from 1 to n.

Write a script to find if every row and every column contains all the integers from 1 to n.

@manwar
manwar / pwc-380.md
Created June 24, 2026 00:45
The Weekly Challenge - 380

The Weekly Challenge - 380

Early Bird Club members ONLY

Task 1: Sum of Frequencies

Submitted by: Mohammad Sajid Anwar

You are given a string consisting of English letters.

Write a script to find the vowel and consonant with maximum frequency. Return the sum of two frequencies.

@manwar
manwar / pwc-379.md
Last active June 21, 2026 11:21
The Weekly Challenge - 379

The Weekly Challenge - 379

Early Bird Club members ONLY

Task 1: Reverse String

Submitted by: Mohammad Sajid Anwar

You are given a string.

Write a script to reverse the given string without using standard reverse function.

@manwar
manwar / pwc-378.md
Last active June 11, 2026 18:03
The Weekly Challenge - 378

The Weekly Challenge - 378

Early Bird Club members ONLY

Task 1: Second Largest Digit

Submitted by: Mohammad Sajid Anwar

You are given an alphanumeric string.

Write a script to find the second largest distinct digit in the given string. Return -1 if none found.

@manwar
manwar / http-message.md
Last active June 6, 2026 01:53
HTTP::Message v7.02

I just came across recent change to HTTP::Message released as v7.02.

The entry in Changes

7.02 2026-06-05 23:28:36Z

  • now handling HTTP method '0' (GH#211) (Karen Etheridge)

I asked myself, method '0'?

Never heard of it before.

@manwar
manwar / pwc-377.md
Last active June 2, 2026 16:24
The Weekly Challenge - 377

The Weekly Challenge - 377

Early Bird Club members ONLY

Task 1: Reverse Existence

Submitted by: Mohammad Sajid Anwar

You are given a string.

Write a script to find whether any substring of length 2 is also present in the reverse of the given string.