(Links in the comment and sorry about the title!)
Ask HN: Have I discovered an insoluble programming problem?
1–6 of 6 posts
Re: Ask HN: Have I discovered an insoluble programming problem?
#2Re: Ask HN: Have I discovered an insoluble programming problem?
#3I'm sorry you seemed to have not gotten help on this. The title seemed a little silly to me.
Re: Ask HN: Have I discovered an insoluble programming problem?
#4Here is how you do it: input is the list of words, with duplicates you need an additional list (let's call it x) and an integer (let's call it i) for each item in the list, if it isn't in x, add it, increment i, and print it followed by a space if it is in x, print a newline, and spaces equal to the number of characters in each preceding word after index i in x + 1 for each word in that range. There should be x.index…
Re: Ask HN: Have I discovered an insoluble programming problem?
#5Here is how you do it: input is the list of words, with duplicates you need an additional list (let's call it x) and an integer (let's call it i) for each item in the list, if it isn't in x, add it, increment i, and print it followed by a space if it is in x, print a newline, and spaces equal to the number of characters in each preceding word after index i in x + 1 for each word in that range. There should be x.index…
In my problem, I get a string s that user enters in a form.
I append that to an empty list L = []
then I test if the last saved string is the same as the new string. If same, I write it on the same column; if not the cursor moves to next column (I was trying to do this with tables) and as long as the user types the same string the cursor stays on the same column. If a new string is typed; a new column is started; and so on.
I don't think your solution is to this problem. You assume that there is a list with duplicates.
Does this make sense?
Re: Ask HN: Have I discovered an insoluble programming problem?
#6Here is how you do it: input is the list of words, with duplicates you need an additional list (let's call it x) and an integer (let's call it i) for each item in the list, if it isn't in x, add it, increment i, and print it followed by a space if it is in x, print a newline, and spaces equal to the number of characters in each preceding word after index i in x + 1 for each word in that range. There should be x.index…
Thanks but I am sorry but I don't understand this solution. In my problem, I get a string s that user enters in a form. I append that to an empty list L = [] then I test if the last saved string is the same as the new string. If same, I write it on the same column; if not the cursor moves to next column (I was trying to do this with tables) and as long as the user types the same string the cursor stays on the same co…