r/programbattles • • Oct 08 '15

Any language Given a list A and a number B, return all permutations/combinations of B elements from A

6 Upvotes

Hopefully, the program will do both as requested.


r/programbattles • • Oct 10 '15

Any language Find longest increasing subsequence

5 Upvotes

Given a sequence of integers S[1..n], find the largest sequence contained within S, call it A[0..k], where A[0] < A[1] < A[2] < ... < A[k-1] < A[k]. Also, the members of A need not be neighbors in S. Or, put another way, given A[i] and A[i + 1], There may have been members of the sequence S between A[i] and A[i+1] that are not included in A.

An example solution:

So for the sequence S = [4, 3, 2, 1, 3, 4, 2, 5, 8, 9, 0, 5], the solution is A = [1, 3, 4, 5, 8, 9].


r/programbattles • • Jul 06 '20

Any language IP2Location Programming Contest 2020 is inviting participants to join and win prizes worth $14,444 in total!

4 Upvotes

It's time to show your coding skill and win fabulous prizes worth $14,444!

See https://contest.ip2location.com for more information.


r/programbattles • • Nov 22 '15

Batch Need a batch file (optional shell script) to manage my music files better

3 Upvotes

Hi guys, I just sort my music library and I did not get ahead , because everything takes forever . I used to have a batch file that has made most things automatically , but that has been lost during the last crash ( was on C : ... ) . So the following : One "artists" folder contains loose music files & some "album" folders (eg . " Album1 " , " Album2 " etc.) . In each album folder are either folders or not (eg . " Under 1 " , " Under 2 " etc.) . What I now always do by hand is an endless work. So here are the instructions: Move all! files from the subfolders ( " Under ... " ) in the parent album folder ( Album1 ) and delete the subfolder . Delete all the * .m3u & * .pl files (all playlist files) Delete all the * .jpg & * .png files (all image files) This way all my music files are on the correct level of the file path/ directory & I can tag them correctly with a regular tagging program (such as MP3Tag or GodFather). It s important that the batch doesn't foreget to move every! music file (incl. .mp3;.m4a;.wav;.flac;.aac;.wma;*.ogg) on the higher level. Damned. U would really help me a lot ;) -a reddit loyal

p.s.: regular tagging programs are not able to do that, because they consider to one strict path u give them & are not variable.


r/programbattles • • Feb 07 '16

C# Button based game in C#

2 Upvotes

Develop a “tile based” game i.e. a game based around a grid of buttons (or other UI objects). In addition it should demonstrate a combination of a “design view” constructed UI with components for entering your name and displaying a score etc. The choice of the game is yours let the battle commence!!


r/programbattles • • Nov 18 '15

C++ Binary Search Tree

2 Upvotes

Create a program in C++ that allows a user to add an int data type to the tree and cleans it up, also checks if a use given int in in the tree and finally can also print out the contents inorder.


r/programbattles • • Apr 06 '18

Can Someone Help me out !!

1 Upvotes

So i've been making a website for my college project. this is a site where you can buy cheap flight tickets and hotels. its like an affiliate site..i am getting problem in making search form box where we have to input the data.. for example : https://www.trip.com/ in this site..there is a booking form having tabs of flight and hotels etc.. i am unable to design that.. and also unable to find that anywhere on the internet.. can someone help me out !! here are some more example of that booking form.. https://www.flightgala.com/ https://www.skyscanner.co.in/ https://www.yatra.com/byop


r/programbattles • • Oct 10 '15

C++ String incrementation

1 Upvotes

Restrictions: N/A

Description: Write a function that increments a string (increment the string as if it was a number in base 127)


r/programbattles • • Oct 10 '15

Any language Generate the original 150 Pokemon [Any Language]

0 Upvotes

Output should be 150 jpg or png files. Penalty for using ps or svg. Obviously, just reading and converting images is boring, so get creative with how you'd encode them in your respective languages. Base64+gzip? Don't care. Surprise me!

If you need some resources, you can get copies of the original sprite sheets here: http://veekun.com/dex/downloads


r/programbattles • • Dec 01 '15

Any language Date changer

0 Upvotes

Can you write something that upon opening a program, say Microsoft Word, my system's date changes to something like January 1, 2000 and then automatically updates to the current date and time when I close that program?

I'm not sure what language it would need to be in or how to apply it. To be clear, this is a "can you do this for me" type of thing, but I think it also makes for a cool challenge.

PS: Let me know if there's an appropriate language for this and I'll change the flair!