Solving the task from The Weekly Challenge 233, where you need to sort numbers by two dimensions.
Sorting numbers in Raku with the help of ChatGPT
Solving the task from The Weekly Challenge 233, where you need to sort numbers by two dimensions.
Science, Programming, Electronics, Languages
Solving the task from The Weekly Challenge 233, where you need to sort numbers by two dimensions.
Solving the task from The Weekly Challenge 233, where you need to sort numbers by two dimensions.
A solution to the task 1 of the Weekly Challenge 233, where the goal is to find the words constructed from the same letters.
A solution to the task 1 of the Weekly Challenge 233, where the goal is to find the words constructed from the same letters.
Two tasks from the Weekly Challenge 231 solved in the Raku programming language.
Two tasks from the Weekly Challenge 231 solved in the Raku programming language.
Using Raku grammar, I created a simple calculator that works with Roman numbers, for example: `XXI + MCMXIX`.
Using Raku grammar, I created a simple calculator that works with Roman numbers, for example: `XXI + MCMXIX`.
The Raku solution to the following task: Write a script to find out how many dates in the year are Friday 13th, assume that the current Gregorian calendar applies.
The Raku solution to the following task: Write a script to find out how many dates in the year are Friday 13th, assume that the current Gregorian calendar applies.
Let us solve the second task from the Weekly Challenge 204. It is called ‘Reshape matrix’.
Let us solve the second task from the Weekly Challenge 204. It is called ‘Reshape matrix’.
Let us ask ChatGPT to find a solution and then correct it to make it more Raku-ish. This task, the machine solved the thing from the first attempt, but you can follow how we managed to make it better and more compact. Most (except one) of the generated code workes without compiler errors, so I will not concentrate on it here.
Let us ask ChatGPT to find a solution and then correct it to make it more Raku-ish. This task, the machine solved the thing from the first attempt, but you can follow how we managed to make it better and more compact. Most (except one) of the generated code workes without compiler errors, so I will not concentrate on it here.
This week’s task has an interesting solution in Raku. So, here’s the task:
You are given two strings $A and $B. Write a script to check if the given strings are Isomorphic. Print 1 if they are otherwise 0.
This week’s task has an interesting solution in Raku. So, here’s the task:
You are given two strings $A and $B. Write a script to check if the given strings are Isomorphic. Print 1 if they are otherwise 0.
Here’s my Raku breakfast with the solutions of Week 91 of The Weekly Challenge. A couple of simple programs with Raku arrays.
Here’s my Raku breakfast with the solutions of Week 91 of The Weekly Challenge. A couple of simple programs with Raku arrays.
Welcome back to another week of the Weekly Challenge, and today I’ll briefly describe my solutions to the Week 85. Task 1. Triplet Sum. Task 2. Power of Two Integers.
Welcome back to another week of the Weekly Challenge, and today I’ll briefly describe my solutions to the Week 85. Task 1. Triplet Sum. Task 2. Power of Two Integers.
Let me return to the old challenges from last year and fill a few more gaps. The task for now is to write a program to output the same number of π digits as the size of the program.
Let me return to the old challenges from last year and fill a few more gaps. The task for now is to write a program to output the same number of π digits as the size of the program.
This week, The Weekly Challenge offered us a couple of simple tasks, so why not solve it on Monday. Task1: Leader Element. Task 2: Left Rotation.
This week, The Weekly Challenge offered us a couple of simple tasks, so why not solve it on Monday. Task1: Leader Element. Task 2: Left Rotation.
This week, I wrote a few programs solving the task of this week’s Weekly Challenge. I already explained the solution in the Raku programming language. In this post, I’d like to demonstrate other solutions. The key point is that they not only use different programming language but also approach the problem differently and implement different algorithms.
This week, I wrote a few programs solving the task of this week’s Weekly Challenge. I already explained the solution in the Raku programming language. In this post, I’d like to demonstrate other solutions. The key point is that they not only use different programming language but also approach the problem differently and implement different algorithms.
The second task of this week’s challenge sounds like this:
You are given m x n character matrix consists of O and X only. Write a script to count the total number of X surrounded by O only. Print 0 if none found.
The second task of this week’s challenge sounds like this:
You are given m x n character matrix consists of O and X only. Write a script to count the total number of X surrounded by O only. Print 0 if none found.
The task today is: You are given a positive integer $N. Write a script to find out all possible combination of Fibonacci Numbers required to get $N on addition. You are NOT allowed to repeat a number. Print 0 if none found.
The task today is: You are given a positive integer $N. Write a script to find out all possible combination of Fibonacci Numbers required to get $N on addition. You are NOT allowed to repeat a number. Print 0 if none found.
A couple of days ago I published a straightforward solution to the Task 2 of Week 75 of The Weekly Challenge. Despite that solution perfectly works, I wasn’t satisfied with it and wanted a more Raku-ish code. Here is the next iteration of it. my @hist = 3, 2, 3, 5, 7, 5; my $max … Continue reading “A more idiomatic Raku solution”
Hello, here is my solution to the Task 2 of Week 75 of the Weekly Challenge solved in the Raku programming language.
You are given an array of positive numbers @A. Write a script to find the largest rectangle histogram created by the given array.
Hello, here is my solution to the Task 2 of Week 75 of the Weekly Challenge solved in the Raku programming language.
You are given an array of positive numbers @A. Write a script to find the largest rectangle histogram created by the given array.
Here is my solution to the Task 1 of the Week 75 of the Weekly Challenge solved in the Raku programming language.
You are given a set of coins @C, assuming you have infinite amount of each coin in the set. Write a script to find how many ways you make sum $S using the coins from the set @C.
Here is my solution to the Task 1 of the Week 75 of the Weekly Challenge solved in the Raku programming language.
You are given a set of coins @C, assuming you have infinite amount of each coin in the set. Write a script to find how many ways you make sum $S using the coins from the set @C.
The Perl Weekly Challenge was renamed to The Weekly Challenge recently, so there’s a bigger chance that more solutions in other programming languages appear there.
In the two Raku solutions in this post, you can see how you can use the built-in Bag data type.
Task 1. Majority Element (Raku and C++ solutions). Task 2. First Non-Repeating Character (Raku solution).
The Perl Weekly Challenge was renamed to The Weekly Challenge recently, so there’s a bigger chance that more solutions in other programming languages appear there.
In the two Raku solutions in this post, you can see how you can use the built-in Bag data type.
Task 1. Majority Element (Raku and C++ solutions). Task 2. First Non-Repeating Character (Raku solution).
Here are my solutions to the tasks of Week 73 of the Perl Weekly Challenge: 1) Min Sliding Window and 2) Smallest Neighbour.
Here are my solutions to the tasks of Week 73 of the Perl Weekly Challenge: 1) Min Sliding Window and 2) Smallest Neighbour.