- Website: www.perlmonks.org/?node_id=832495
Commented on In defence of OOP
Good points! Looking forward for the next parts....
Commented on Is it possible to return to development with traditional P5P mailing lists?
What problem should moving to a mailing list solve? The mailing list was public, anyway, so apart from security issues, there was no "secret room" for the elite to discuss stuff before disclosing it. GitHub just makes participation easier for...
Posted Perl Weekly Challenge 061: Product SubArray And IPv4 Partition to E. Choroba
Given a list of 4 or more numbers, write a script to find the contiguous sublist that has the maximum product. The length of the sublist is irrelevant; your job is to maximize the product.
Posted Perl Weekly Challenge 060: Excel Column And Find Numbers to E. Choroba
Write a script that accepts a number and returns the Excel Column Name it represents and vice-versa.
Excel columns start at A and increase lexicographically using the 26 letters of the English alphabet,…
Posted Perl Weekly Challenge 059: Linked List and Bit Sum to E. Choroba
You are given a linked list and a value k. Write a script to partition the linked list such that all nodes less than k come before nodes greater than or equal to k. Make sure you preserve the original rel…
Posted Perl Weekly Challenge 058: Compare Version and Ordered Lineup to E. Choroba
Compare two given version number strings v1 and v2 such that:
- If v1 > v2 return 1
- If v1 < v2 return -1 …
Posted Perl Weekly Challenge 057: Invert Tree and Shortest Unique Prefix to E. Choroba
Shortest Unique Prefix
Write a script to find the shortest unique prefix for each each word in the given list. The prefixes will not necessarily be of the same length.
[ "alphabet", "book", "…
Posted Perl Weekly Challenge 056: Diff-K and Path Sum to E. Choroba
You are given an array @N of positive integers (sorted) and another non negative integer $k. Write a script to find if there exists 2 indices $i and $j such that
$A[$i] - $A[$j…
Posted Perl Weekly Challenge 054: Kth Permutation Sequence + Collatz Conjecture to E. Choroba
Kth Permutation Sequence
Write a script to accept two integers n (>=1) and k (>=1). It should print the k-th permutation of n integers.
For example, n=3 and k=4, the po…
Posted Perl Weekly Challenge 053: Rotate Matrix and Vowel Strings to E. Choroba
Write a script to rotate the following matrix by given 90/180/270 degrees clockwise.
[ 1, 2, 3 ] [ 4, 5, 6 ] [ 7, 8, 9 ]
For example, if you rotate by 90 degrees then expected r…
Posted Perl Weekly Challenge 052: Stepping Numbers & Lucky Winner to E. Choroba
Write a script to accept two numbers between 100 and 999. It should then print all Stepping Numbers between them.
A number is called a stepping number if the adjacent digits have a difference of 1.…
Posted Perl Weekly Challenge 051: 3 Sum and Colourful Numbers to E. Choroba
Given an array
@Lof integers. Write a script to find all unique triplets such that a + b + c is same as the given target T. Also make sure a <= b <= c…
Posted Perl Weekly Challenge 050: Merge Intervals and Noble Integer to E. Choroba
Write a script to merge the given intervals where ever possible.
[2,7], [3,9], [10,12], [15,19], [18,22]
The script should merge [2, 7] and [3, 9] together to return …
Commented on Perl Weekly Challenge: Smallest Multiple and LRU Cache
Note that $set->(3, 7) for 1 .. $capacity; removes all other keys from the cache (improbable for caches with a large capacity, though)....
Posted Perl Weekly Challenge 049: Smallest Multiple and LRU Cache to E. Choroba
Write a script to accept a positive number as command line argument and print the smallest multiple of the given number consists of digits 0 and 1.
For example: For given number …
Posted Perl Weekly Challenge 048: Survivor and Palindrome Dates to E. Choroba
There are 50 people standing in a circle in position 1 to 50. The person standing at position 1 has a sword. He kills the next person i.e. standing at position 2 and pass on the sword to the immediate next i.e. person standing a…
Posted Perl Weekly Challenge 046: Cryptic Message & Is the Room Open? to E. Choroba
The communication system of an office is broken and message received are not completely reliable. To send message Hello, it ended up sending these following:
H x l 4 ! c e
Posted Perl Weekly Challenge 045: Square Secret Code & Source Dumper to E. Choroba
Square Secret Code
The square secret code mechanism first removes any space from the original message. Then it lays down the message in a row of 8 columns. The coded message is then obtained by reading down the columns going left to righ…
Posted Perl Weekly Challenge 044: One Hundred, Two Hundred to E. Choroba
Only 100, please
You are given a string “123456789”. Write a script that would insert ”+” or ”-” in between digits so that when you evaluate, the result should be 100.
Posted Perl Weekly Challenge 043: Olympic Rings and Self-Descriptive Numbers to E. Choroba
There are 5 rings in the Olympic Logo [as shown below]. They are colour coded as in Blue, Black, Red, Yellow and Green. We have allocated some numbers to these rings as below: Blue: 8, Yellow: 7, Green: 5, Red: 9. Th…
Posted Perl Weekly Challenge 040: Multiple Arrays & Sort SubList to E. Choroba
You are given two or more arrays. Write a script to display values of each list at a given index.
Array 1: [ I L O V E Y O U ] Array 2: [ 2 4 0 3 2 0 1 9 ] Array 3: [ ! ?…
Posted Perl Weekly Challenge 039: Guest Book and Reverse Polish Notation to E. Choroba
A guest house had a policy that the light remain ON as long as the at least one guest is in the house. There is guest book which tracks all guest in/out time. Write a script to find out how long in minutes the light were ON.…
Posted Perl Weekly Challenge 038: Date Finder and Word Game to E. Choroba
Create a script to accept a 7 digits number, where the first number can only be 1 or 2. The second and third digits can be anything 0-9. The fourth and fifth digits corresponds to the month i.e. 01, 02, 03…, 11, 12. And the last 2 digits resprese…
Posted Perl Weekly Challenge 037: Weekdays and Daylight Gain/Loss to E. Choroba
Write a script to calculate the total number of weekdays (Mon-Fri) in each month of the year 2019.
I used the core module Time::Piece and its companion from the same distribution…
Posted Perl Weekly Challenge 036: VIN Validation and the Knapsack Problem to E. Choroba
Write a program to validate given Vehicle Identification Number (VIN).
I followed the description at Wikipedia. Sometimes, it wasn’t exactly…
Commented on New Perl project. Interactive Perl coding tasks to run in the browser
It should be "Interactive Perl problems"....
Posted Perl Weekly Challenge 035: Binary Morse Code to E. Choroba
Write a program to encode text into binary encoded Morse code.
Before we can encode Morse code into its binary representation, we need to encode normal text into Morse code. As a former ="https://en.wikipedia.org…
Posted Perl Weekly Challenge 034: Slices and a Dispatch Table to E. Choroba
Write a program that demonstrates using hash slices and/or array slices.
In the spirit of TIMTOWTDI I decided to write a single program that demonstrates both the task…
Posted Perl Weekly Challenge 033: Count Letters & Formatted Multiplication Table to E. Choroba
Create a script that accepts one or more files specified on the command-line and count the number of times letters appeared in the files.
From the example we can see that we should count the letters in a case insensit…
Posted Perl Weekly Challenge 032: Frequency Table & ASCII Bar Chart to E. Choroba
Create a script that either reads standard input or one or more files specified on the command-line. Count the number of times and then print a summary, sorted by the count of each entry.
The original title of the t…
Ivan Bessarabov commented on
New Perl project. Interactive Perl coding tasks to run in the browser
> I feel if a problem is added from web form, and answers are also added from web form, it will become interactive communication by a teacher and students.
I agree. Creating a file in some format on GitHub is not as user friendly as using a tool created exactly for that purpose. For this project I wanted that there is a way to change/add new problems from the very beginning. And as a cheap and easy solution I've used GitHub repo to allow edits.
We'll see what will happen in the future. If there is a demand for simple problem editing tool it is quite possible that I will create…
Yuki Kimoto commented on
Is it possible to return to development with traditional P5P mailing lists?
This is a comparison with the Perl committee, which is held by a small number of people.
It's a suggestion that p5p can go back to the mailing list conversation for big decisions.
I believe that big decisions should always be publicly and carefully discussed, even if some people disagree.
We can look for suggestions that are better for both sides.
If we can't find better way, the decision is something wrong.
Vincenzo Buttazzo commented on
In defence of OOP
👍 part two will be interesting!
Ron Grunwald commented on
In defence of OOP
Hallo lichtkind! I remember the excellent series of articles that you wrote about WxPerl programming and published in the German $foo Magazin. I look forward to reading your series on OOP.
lichtkind commented on
In defence of OOP
Hai guys I'm very happy you liked it and you remember me. I'm preparing next part and also fixed typos and will elaborate already published article here and there so please recheck when next part goes public (end of next week probably).
blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.