Weekend Programming Challenge Issue #19 – Pattern match

Image

Problem:

Make function match() which takes as input input_string and pattern_string, the input strings may contain any ASCII codes

there are two special codes for use in the pattern-string: ?-replaces 1 character and * – replaces any character(s)

The function should print all words from the input-string which match the pattern-string

words can be separated by any of these characters: ‘ ” . , : ;

if the input-string have this content “The big black cat jump over the window”

if pattern-string is “b*” should print
big
black

if pattern-string is “*c*” should print
black
cat

if pattern-string is “?i*” should print
big
window

The rules:

You can code the solution in any programming language during the weekend and have to submit it to info@olimex.com latest on Sunday July 28th.

On Monday we will upload the solutions on GitHub and review https://github.com/OLIMEX/WPC .

You can play with your real name or with nick if you want to be anonymous, we will not disclosure your personal info if you do not want to.

Good Luck and Have fun!

Weekend Programming Challenge Issue-18 Solutions

Image

We have two heroes for WPC Issue-18. Seems the short time maked it difficult for many to participate and we got just two submissions:

Antal Koos and Teodor Nikodimov – you can see their solutions at https://github.com/OLIMEX/WPC/tree/master/ISSUE-18

Weekend Programming Challenge Issue-18 – Console Text Editor

Image

Problem: create simple text editor for VT100 terminal

Many of us remember Borland’s Turbo Pascal V3.0 which in 39K had compiler, linker, run-time library and minimal WordStar type text editor.

BAS-INT is freeware tiny Basic interpreter with the bare minimum for BASIC scripting language. It works with external files only and is with Basic Stamp like syntax.

The Challenge today is to write minimal console editor which to complement BAS-INT and to perform some very basic commands:

List – list the program in memory with numbers
Delete N(-M) – deletes line N or N to M from memory
Insert N – inserts line on number N
Run – runs the BASIC program in memory (this code is already available)

if one wants to make it even more advanced he may make also the
Edit N – prints the content of line N and allow it to be edited

Remember this is console application and you have just serial in and serial out, no fancy graphics and windows in this editor.

The BAS-INT template is uploaded on GitHub https://github.com/OLIMEX/WPC/tree/master/ISSUE-18/BAS-INT

The rules:

You can code the solution in any programming language (well obviously as you have to integrate BAS-INT which is written in C this any language for this problem must be C) during the weekend and have to submit it to info@olimex.com latest on Sunday July 21th.

On Monday we will upload the solutions on GitHub and review https://github.com/OLIMEX/WPC .

You can play with your real name or with nick if you want to be anonymous, we will not disclosure your personal info if you do not want to.

Good Luck and Have fun!

Weekend Programming Challenge Issue 17 – Skytale

Image

Ancient Greeks and Spartans used Skytales to send encrypted messages, they wound on bar stripe then write on it, when the stripe is unwound the letters become shifted and you cant read the message again until you wound it on rod with same diameter.

Problem

Write code which crypt and de-crypt message on Skytale, as input you can take message and diameter of the rod.

Note: the problem is very easy to solve, so surprise us with WOW solution, one liner or something else 🙂

The rules:

You can code the solution in any programming language during the weekend and have to submit it to info@olimex.com latest on Sunday July 14th.

On Monday we will upload the solutions on GitHub and review https://github.com/OLIMEX/WPC .

You can play with your real name or with nick if you want to be anonymous, we will not disclosure your personal info if you do not want to.

Good Luck and Have fun!

Weekend Programming Challenge Issue-16 Solutions

in-post.gif (413×238)

We got 12 solutions: 5 in C++, and x1 in C, Clojure, Scheme, JavaScript, Python and Lua.

All solutions as usual on GitHub https://github.com/OLIMEX/WPC/tree/master/ISSUE-16

Weekend Programming Challenge Issue 16 – Infix to Postfix converter

Image

Problem:

Input string which is mathematical statement written in normal Infix Notation and convert it to Postfix Notation.

Infix notation is the normal way we write mathematical statements like:

(10 + 20) / (30 - 40)

Postfix notation (also known as Reverse Polish notation) is where every operator follows all of its operands and is parenthesis-free, the above statement written in Postfix notation is:

10 20 + 30 40 - /

The rules:

You can code the solution in any programming language during the weekend and have to submit it to info@olimex.com latest on Sunday July 7th.

On Monday we will upload the solutions on GitHub and review https://github.com/OLIMEX/WPC .

You can play with your real name or with nick if you want to be anonymous, we will not disclosure your personal info if you do not want to.

Good Luck and Have fun!

Aaaahhh Copycats – Weekend Programming Challenge has been copied by Circuit Cellar and IAR Systems

Image

The Weekend Programming Challenge had been proposed by Mateusz Klatecki few months ago, while playing in our Friday Free Board Quiz, when he won a board he didn’t have use for, and decided to give it away to someone who needs it.

He said that he participates the Friday Quiz just to test his knowledge and proposed to start some kind of Challenge in Programming which to run over the weekend.

We liked the idea and this is how the WPC was born. You can read the announcement from March 18th https://olimex.wordpress.com/2013/03/18/friday-free-board-quiz-update/

WPC has been running now for 15 weeks and gets more and more popular. Every Friday a lot of people come to our blog to see the challenge but not so many dare to complete it 😉

WPC seems also to have gotten the attention of other companies too, as yesterday I saw that CircuitCellar sponsored by IAR ran similar challenge soon after us 🙂

http://circuitcellar.com/cc-weekly-code-challenge/

Previous Older Entries Next Newer Entries