« first day (3307 days earlier)      last day (1534 days later) » 

5:09 AM
G'day everyone!
 
 
2 hours later…
7:39 AM
0
Q: The Sorting Hat

RGSContext At Hogwarts School of Witchcraft and Wizardry, students are sorted into 4 houses, 0 - Gryffindor, 1 - Ravenclaw, 2 - Slytherin and 3 - Hufflepuff. This sorting is done by a magical hat, called the Sorting Hat. Task Your task is to code a sorting hat. In other words, you should create s...

 
 
3 hours later…
10:22 AM
1
Q: code-bowlingn't

LyxalIf you place the suffix n't on any given word, it instantly means the opposite of the intended usage of the word. If you place the word not before any given word, it instantly negates the next word. Therefore, today's challenge is about turning words in the form of not <word> into <word>n't Ru...

1
Q: Shift the digits

a'_'Here, x (supplied as input) and n (the result of your computation) are both positive integers. n * x = n shifted. Find n. Here's an example of shifting: 123456789 -> 912345678 abcdefghi -> iabcdefgh (letters = any 0~9 digit) 123 -> 312 Rules Preceding zeros count after shifting. If th...

 
10:58 AM
Not really. They tend to post an answer 1 hour after a question is posted. (But it's almost 1 hour.)
That is, for an average-difficulty question.
 
0
Q: The most common substring

simonalexander2005The purpose of this task is to write a program or function to find the most common substring within a given string, of the specified length. Inputs A string, s, of any length and characters that are valid as inputs for your language. A number, n, indicating the length of substring to find. Gua...

 
11:34 AM
@a'_' Reply. I gotta vote them now.
 
0
A: Sandbox for Proposed Challenges

MukundanFind the largest deletable prime with no zeros code-challenge primes Inspired by Find the largest recurring prime and Find the largest fragile prime Deletable primes (A080608) are primes such that removing some digit leaves either the empty string or another deletable prime. Examples 415673 i...

 
hello!
Could anyone give me a hand with stackoverflow.com/questions/60278675/… please?
 
11:46 AM
Great. I got Inverse Look-and-Say on page 5.
 
@a'_' can you explain more? Why is that great?
 
@Anush That's closer to getting the Electorate badge.
 
12:04 PM
@a'_' this is something I know nothing about
 
12:15 PM
@Anush Well, that's a Gold CGCC badge.
 
how do you get it from having a question that is on page 5 of the new question list?
 
I voted up all the questions starting from the latest question all the way to this page 5 question.
 
oh!
is that sensible?
That doesn't seem to be voting correctly
but thanks if one of them was mine :)
 
Look through all the questions and try to find yours! (I have 50 questions in a single page, under my current configuration.)
 
:)
is there any way in python to print a table? That is something you might get from a word processor, not in ASCII
 
12:24 PM
The easiest way is to generate HTML code. And then view the output HTML in a browser.
 
I want to print it but that could work too I guess?
is there a library to make tables in HTML?
 
I guess there's Markdown, which generates HTML tables.
 
pypi.org/project/tabulate looks like it will do it
 
1:17 PM
@Anush print("(╯°□°)╯︵ ┻━┻")
 
That is something ... not in ASCII.
 
It's an upgraded version of ASCII
 
Gotcha! print("(╯°□°)╯︵ ┻━┻") isn't a valid table. It's in ASCII.
 
@a'_' That doesn't look like ASCII to me. What encoding are you using? ;-)
 
2:09 PM
sometimes this chat room is very helpful.. and sometimes... less so :)
 
Because the helpful people aren't in the chatroom.
 
:)
If I have n line intervals and I want to report all the overlapping pairs, what is the time complexity?
is it O(n log n)?
 
hint: how much time does it take to report one pair, and how many are there at maximum?
 
I guess there are (n^2) pairs so could it be O(n log n + k) ?
I thinking of an algorithm as follows
 
What's k?
If it's the number of pair, then I believe you're correct
 
2:26 PM
sort the intervals by left endpoint. Also put all the endpoints into a binary search tree
hmm.. actually I am not sure how it would work
any ideas?
@JohnDvorak how exactly would the algorithm work?
 
There's a technique that Doom used for its rendering algorithm. You should be able to use it.
 
but what is it?
 
I'll give you three hints: It's a tree, it has two children per node, and it divides 2D space into convex chunks.
In other words, it's a ...
binary space-partitioning tree!
 
2:44 PM
I'm really bored. Upvoting every answer - I've already done it. Next step: Add leaderboards to the popular challenges!
(And I got 508 in just 7 days (in the new users tab)!)
 
@JohnDvorak I think it's much simpler than that
 
I'm listening
 
We want to maintain the current set of intervals which are "live"
sort the endpoints
 
BSP is a simple solution
 
start from the left
 
2:51 PM
sort in which coordinate?
 
the start points
sorry no
sort both the start and endpoints together but keep a record of which is which
now.. start from the left
and go right
 
Ah, you mean intervals on the number line, not line segments in 2d!
 
when we come to a point, look and see if it is a start or endpoint. If it is start point report an intersection with all the intervals that are "live"
and add it to the set
 
Then yes, it's trivial in O(n log n)
 
@JohnDvorak yes
@JohnDvorak well.. it's not n log n as the output can be n^2
 
2:53 PM
I mean, counting them is trivial in O(n log n)
 
if you get to an endpoint, remove that interval from the set
I think that algorithm does it
do you agree?
 
aye
 
but now I am confused by page 11 of page.mi.fu-berlin.de/panos/cg13/l03.pdf
 
be careful with multiple overlapping endpoints
 
I would love some help understanding what they are claiming there for this problem
@JohnDvorak I am declaring that no two endpoint coincide :)
"Sort the endpoints and handle them from left to right; maintain
currently intersected intervals in a balanced search tree T"
 
2:55 PM
Classical error. You can't assume anything about user-provided data
 
sorry page 5/10
why are they talking about a balanced search tree?
 
it's so that you know which intervals are open
 
open as in what I call "live"?
so this is instead of using a set?
 
the tree is the set.
You can use a hashset instead, but it doesn't knock down the overall complexity, and it can't actually guarantee its performance.
 
got you
what are the keys in the binary search tree?
 
3:07 PM
Their IDs presumably
 
3:47 PM
0
Q: Math Question - Grade 6

johnMr.Oś odometer shows a mileage of 126251 kilometers. In how many kilometers will the odometer show a palindrome number?

 
we need more question about producing random math problems, with answers
 
4:19 PM
18
Q: The Bridge and Torch Problem

baseman101The inspiration for this code golf puzzle is the Bridge and Torch problem, in which d people at the start of a bridge must all cross it in the least amount of time. The catch is that at most two people can cross at once, otherwise the bridge will crush under their weight, and the group only has ...

 
4:55 PM
@Anush I think I was wrong here
 
ah ok. What should it be?
I tried to do k=14 but the server I was running it on must have a sysop who killed the job after a few days :)
I don't have a PC I control fully with enough RAM
 
5:28 PM
@Anush Well, I have nothing much more concrete than the opposite of what I claimed: automaton for distance exact k has several final states
 
@ChristianSievers Thanks. When I have time I will try to translate this whole thing to openfst to see if it helps
but I am not sure when that would be
 
 
2 hours later…
7:55 PM
is there a better word for integeryness?
 
@Neil Context?
 
I have a list of inputs, and I want to sort them by integeryness for codegolf.stackexchange.com/questions/199560/sort-list-by-types
 
integrality, integrity
wholesomeness
holism
 
turns out it's golfier to sort them by something else anyway, but thanks for trying
 
@Neil Out of curiosity, can you define this concept a bit?
 
8:02 PM
0
A: Sandbox for Proposed Challenges

MathgeekIs this list modulus-aligned? code-golf math Two numbers are aligned in a modulus when they both share the same remainder when they can be put under the modulus function against an integer greater than or equal to 2 and less than or equal to the absolute value of both. For example, 13 and 22 ...

 
my previous solution used a helper sort key function which returned 1 for integers and 0 for non-integers, so that the list could be sorted by this value, which I wanted a name for
 
8:45 PM
you would say integrity, integritude, integralitude etc.
there's no wrong choice
holism is the golfiest thanks Adám
 
 
3 hours later…
11:17 PM
The fact that Microsoft refuses to accept the Ctrl+Shift+V Hotkey as paste without formatting hurts me.
 
@ATaco stevemiller.net/PureText — do one thing, and do it well!
 
I've done the same before with AHK :P
AHK helped me surprisingly often in my professional life.
 

« first day (3307 days earlier)      last day (1534 days later) »