• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 19:50
CET 01:50
KST 09:50
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Team Liquid Map Contest #232[ASL22] Finals Preview: Sweet Victory!12[ASL22] Ro4 Preview: Mirror Mirror6[ASL22] Ro8 Preview: Within Reach5[ASL22] Ro8 Preview: In A Tizzy11
Community News
Weekly Cups (Nov 9-15): Clem and herO take over1Dark completes military service, returns to SC215[BSL23] RO16 Group Stage20Weekly Cups (Nov 2-8): herO back on top?2Weekly Cups (Oct 26 - Nov 1): MaxPax, herO, Solar win0
StarCraft 2
General
Team Liquid Map Contest #23 Dark completes military service, returns to SC2 Weekly Cups (Nov 9-15): Clem and herO take over StarCraft open world shooter announced at BlizzCon No more SC2 streamers on team liquid?
Tourneys
RSL goes to London! 2026 Offline Finals Nov 21-22 Sparkling Tuna Cup - Weekly Open Tournament Sea Duckling Open (Global, Bronze-Diamond) Dark returns! GSL CK #7 4v4 Team Battle (Nov 19) soO & FanTaSy return! SC2 Kevin Scrim 4v4 (Nov 16)
Strategy
[H] ZvP Mid-Late Game: Stalkers Collossi HT
Custom Maps
[G] How to playtest arcade maps Starcraft 2 Advance [D] the control group Simple Questions/Answers
External Content
Mutation # 552 Secret Storm The PondCast: SC2 News & Results Mutation # 551 Robotic Revival Mutation # 550 Graveyard Shift
Brood War
General
List of top players active on ShieldBattery BW General Discussion NaDa's Body Shield Battery Server New Patch BGH Auto Balance -> http://bghmmr.eu/
Tourneys
SC1 Kevin Scrim hosted by SOOP (Nov 18-19) [IPSL] Winter 26-27 Round of 16! [Megathread] Daily Proleagues 2v2v2v2 Tournament Stage 2: Players
Strategy
Pluto's TvP 5Marine 2Medic Push Simple Questions, Simple Answers Infested Terran strategies in 2026 Nuke strategy worked in K-League 2026-11-09
Other Games
General Games
Nintendo Switch Thread Stormgate/Frost Giant Megathread Free Space RTS Game, optimised f. Phone/Tablet etc List of Game Threads The PlayStation 5
Dota 2
League of Legends
[TL LoL EUW IHs] Teemo shall perish
Heroes of the Storm
Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
TL Mafia Community Thread
Community
General
US Politics Mega-thread Artificial Intelligence Thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine Trading/Investing Thread
Fan Clubs
Fan Club Resource Thread Reynor Fan Club The Flash Fan Club
Media & Entertainment
Movie Discussion! Anime Discussion Thread [Manga] One Piece
Sports
Football (Soccer) Thread TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
The time I organised my…
AssyrianKing
Why I built Repalyzer (1.1.…
BlueStar
Innovate or Game Over?
TrAiDoS
ShieldBattery on Mac
Kraekkling
Can Bots Beat Pros?? Starcr…
namkraft
StarCraft improvement
iopq
Socialism Anyone?
GreenHorizons
Customize Sidebar...

Website Feedback

Closed Threads



Active: 13966 users

The Big Programming Thread - Page 996

Forum Index > General Forum
Post a Reply
Prev 1 994 995 996 997 998 1032 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2019-02-14 03:13:27
February 14 2019 01:26 GMT
#19901
On February 14 2019 04:29 enigmaticcam wrote:
Anyone here a regular on Project Euler? Would like to add as friend so I can occasionally ask for advice.


Nope but it looks really fun! I don't have the most free time in the world but I am gonna try to squeeze in a few of the problems for fun.

May not be on your level but I'd be glad to see if you want to bounce some things off me.


Congratulations, the answer you gave to problem 1 is correct.

You are the 824679th person to have solved this problem.

This problem had a difficulty rating of 5%. The highest difficulty rating you had previously solved was 0%.
This is a new record. Well done!


like a bawss


prroooobably gonna skip ahead a few difficulties now lol


edit2: oh shit i skipped to a 20% difficulty problem. thought I had it and then I realized that I was supposed to calculate from 1 to 4^i, not 4*i. not completely easy mode it seems


edit3: shiiiiiiit i don't actually know how to do this. well my computer can solve it but it's gonna take probably like a week of running, LOL. clearly some sort of math trick involved here... hmmm coming up with some ideas now
if anyone wants to know which one i am doing:

+ Show Spoiler +

For every positive number n we define the function streak(n)=k as the smallest positive integer k such that n+k is not divisible by k+1.
E.g:
13 is divisible by 1
14 is divisible by 2
15 is divisible by 3
16 is divisible by 4
17 is NOT divisible by 5
So streak(13)=4.
Similarly:
120 is divisible by 1
121 is NOT divisible by 2
So streak(120)=1.

Define P(s,N) to be the number of integers n, 1<n<N, for which streak(n)=s.
So P(3,14)=1 and P(6,10^6)=14286.

Find the sum, as i ranges from 1 to 31, of P(i,4^i).



edit4: this is hard but for tonight im obsessed

edit5: ok i figured it out there was a math trick. this site for math people lol
enigmaticcam
Profile Blog Joined October 2010
United States280 Posts
Last Edited: 2019-02-14 02:57:42
February 14 2019 02:53 GMT
#19902
Yeah, sometimes those difficulty percentages can be a bit misleading, depending on what you already know. One time I managed to solve a 70% problem in 15 minutes, and then there’s this 15% problem that takes me weeks to solve.

I think I remember seeing that one before. I haven’t solved it yet, but maybe I’ll give it a try tomorrow.

My friend code is 508144_4VIozmVBgq6rAzXryXF9r8hFh3xtkaaw, if anyone wants to add me. Pm or post yours and I’ll add you.

Edit: many times I’ve been able to solve problems by simply creating a brute force algorithm with a very low threshold, and just looking for patterns. Sometimes a pattern will be really obvious after just a few low level answers.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
February 14 2019 02:58 GMT
#19903
mine is 1457502_u7RGmPGr1WXWeLl5xRpcfZsRvgwckVns
enigmaticcam
Profile Blog Joined October 2010
United States280 Posts
Last Edited: 2019-02-14 16:30:04
February 14 2019 03:21 GMT
#19904
Dang, nice job. I might poke your head about that one.

Edit: Nevermind, I got it too! After playing around in excel I was finally able to find an exploitable pattern.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2019-02-14 18:41:11
February 14 2019 17:57 GMT
#19905
missed a question on a "background knowledge quiz" for one of my classes

doesn't really seem fair... but I want a second opinion before complaining

the question is:

edit: I have to edit the question out so that it doesn't show up if another student does a google search for the question
Excludos
Profile Blog Joined April 2010
Norway8281 Posts
February 14 2019 18:13 GMT
#19906
Answer: Big O is a ridiculous concept and no one actually uses it.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
February 14 2019 18:19 GMT
#19907
okay but that's not helpful I need a second opinion on the actual question lol

I clearly think this is a stupid question, or if it's not clear then yes I think this is a dumb question
Acrofales
Profile Joined August 2010
Spain18502 Posts
February 14 2019 18:24 GMT
#19908
No, the only correct answer is "this question is retarded".
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2019-02-14 18:29:04
February 14 2019 18:26 GMT
#19909
im not allowed to select that, i have to select a or b or c or d within the time limit or else i lose points


but since you guys aren't playing, I will just say, I selected C and got it wrong (oops, they must have wanted D)

my justification is that "very large problems" is clearly just an opinion and I have no choice but to guess what that means, but clearly the greatest jump in complexity is between n^2 and 2^n, and furthermore there are numerous algorithms that require n^2 (or actually a little more) to complete, such as matrix multiplication, shortest paths, graph edge betweenness, etc, and they have no alternatives
Acrofales
Profile Joined August 2010
Spain18502 Posts
February 14 2019 18:29 GMT
#19910
Yup. As I said, the correct answer is "this question is retarded".

Btw, if I asked that question in an exam and a student came up to me with your justification, I'd issue a rectification, scrap that question and acknowledge the question was retarded.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
February 14 2019 18:31 GMT
#19911
okay cool, you gave me what I needed to bother emailing the professor

and if they give me shit i'll tell them acrofales on teamliquid.net says im right
Acrofales
Profile Joined August 2010
Spain18502 Posts
February 14 2019 18:42 GMT
#19912
On February 15 2019 03:31 travis wrote:
okay cool, you gave me what I needed to bother emailing the professor

and if they give me shit i'll tell them acrofales on teamliquid.net says im right

Well, I wouldn't say O(n^2) is more right than O(n log n). I'd say they are both potential answers, but that the question is horribly underspecified, and moreover, when faced with "very large" data and real-world problems, nobody worries about the big-O complexity of the algorithm other than in a very abstract way. People don't look at it and say. Oh, that algorithm is O(n^2), it'll never work. They'll just benchmark it. Moreover "practical" is such a stupid metric. In some problems, it's completely fine to have your supercomputer crunch numbers for weeks on end, and others need a solution in real-time. They obviously require completely different approaches.
solidbebe
Profile Blog Joined November 2010
Netherlands4921 Posts
February 14 2019 19:43 GMT
#19913
On February 15 2019 03:13 Excludos wrote:
Answer: Big O is a ridiculous concept and no one actually uses it.

I mean... academics use it. It's a really useful concept, if you understand it and know how/when to apply it.
That's the 2nd time in a week I've seen someone sig a quote from this GD and I have never witnessed a sig quote happen in my TL history ever before. -Najda
Excludos
Profile Blog Joined April 2010
Norway8281 Posts
February 14 2019 20:46 GMT
#19914
On February 15 2019 04:43 solidbebe wrote:
Show nested quote +
On February 15 2019 03:13 Excludos wrote:
Answer: Big O is a ridiculous concept and no one actually uses it.

I mean... academics use it. It's a really useful concept, if you understand it and know how/when to apply it.


Acrofales described above way better than I ever could. It's a theoretical concept which doesn't translate well into real life use. It's really useful on paper only
solidbebe
Profile Blog Joined November 2010
Netherlands4921 Posts
Last Edited: 2019-02-15 07:59:49
February 15 2019 07:56 GMT
#19915
On February 15 2019 05:46 Excludos wrote:
Show nested quote +
On February 15 2019 04:43 solidbebe wrote:
On February 15 2019 03:13 Excludos wrote:
Answer: Big O is a ridiculous concept and no one actually uses it.

I mean... academics use it. It's a really useful concept, if you understand it and know how/when to apply it.


Acrofales described above way better than I ever could. It's a theoretical concept which doesn't translate well into real life use. It's really useful on paper only

Im not really sure what it means if something is useful 'on paper only'. What Acrofales describes looks like a perspective from industry. I can imagine big O being of very limited use in industry as you will rarely be developing new algorithms for anything, rather than just using something established. So it's probably correct to state that nobody actually uses it... in industry. To state that big O is a ridiculous concept however is a ridiculous statement. It is quite an important concept within the field of algorithmics, where people actually use it.

*Edit before someone hits me with a 'academics also benchmark their algorithms', yes indeed. Big O is not the only thing you should use to describe an algorithm's performance. That doesn't mean it isn't useful.
That's the 2nd time in a week I've seen someone sig a quote from this GD and I have never witnessed a sig quote happen in my TL history ever before. -Najda
Blitzkrieg0
Profile Blog Joined August 2010
United States13132 Posts
February 15 2019 15:30 GMT
#19916
On February 15 2019 16:56 solidbebe wrote:
Show nested quote +
On February 15 2019 05:46 Excludos wrote:
On February 15 2019 04:43 solidbebe wrote:
On February 15 2019 03:13 Excludos wrote:
Answer: Big O is a ridiculous concept and no one actually uses it.

I mean... academics use it. It's a really useful concept, if you understand it and know how/when to apply it.


Acrofales described above way better than I ever could. It's a theoretical concept which doesn't translate well into real life use. It's really useful on paper only

Im not really sure what it means if something is useful 'on paper only'. What Acrofales describes looks like a perspective from industry. I can imagine big O being of very limited use in industry as you will rarely be developing new algorithms for anything, rather than just using something established. So it's probably correct to state that nobody actually uses it... in industry. To state that big O is a ridiculous concept however is a ridiculous statement. It is quite an important concept within the field of algorithmics, where people actually use it.

*Edit before someone hits me with a 'academics also benchmark their algorithms', yes indeed. Big O is not the only thing you should use to describe an algorithm's performance. That doesn't mean it isn't useful.


I'd say it is overemphasized as a concept that will be useful. You spend a ton of time learning and talking about it, but I've never seen it outside of school except in interviews. We know that academics teach it and it is used in academia. The question I would pose is:
Is academia out of touch with industry and emphasizing a concept that most students will never use knowingly or unknowingly?
I'll always be your shadow and veil your eyes from states of ain soph aur.
JimmyJRaynor
Profile Blog Joined April 2010
Canada18067 Posts
Last Edited: 2019-02-15 15:44:55
February 15 2019 15:43 GMT
#19917
On February 15 2019 16:56 solidbebe wrote:
I can imagine big O being of very limited use in industry as you will rarely be developing new algorithms for anything, rather than just using something established.

I`ve developed three customer handicapping algorithms. The algorithm assigns a value to each consumer in marketing lists that an org wishes to "rent" for 1 time usage. This helps the org decide whether or not to "rent" a marketing list. I've never used Big O. Big O is theoretical... for theorists. Its a layer of abstraction above a bunch of other layers of abstraction. I will say that Big O makes possible some entertaining mental gymnastics.
On February 15 2019 16:56 solidbebe wrote:rather than just using something established. So it's probably correct to state that nobody actually uses it... in industry. To state that big O is a ridiculous concept however is a ridiculous statement. It is quite an important concept within the field of algorithmics, where people actually use it.

how is it used within Algorithmics ?
Ray Kassar To David Crane : "you're no more important to Atari than the factory workers assembling the cartridges"
solidbebe
Profile Blog Joined November 2010
Netherlands4921 Posts
February 15 2019 17:15 GMT
#19918
On February 16 2019 00:30 Blitzkrieg0 wrote:
Show nested quote +
On February 15 2019 16:56 solidbebe wrote:
On February 15 2019 05:46 Excludos wrote:
On February 15 2019 04:43 solidbebe wrote:
On February 15 2019 03:13 Excludos wrote:
Answer: Big O is a ridiculous concept and no one actually uses it.

I mean... academics use it. It's a really useful concept, if you understand it and know how/when to apply it.


Acrofales described above way better than I ever could. It's a theoretical concept which doesn't translate well into real life use. It's really useful on paper only

Im not really sure what it means if something is useful 'on paper only'. What Acrofales describes looks like a perspective from industry. I can imagine big O being of very limited use in industry as you will rarely be developing new algorithms for anything, rather than just using something established. So it's probably correct to state that nobody actually uses it... in industry. To state that big O is a ridiculous concept however is a ridiculous statement. It is quite an important concept within the field of algorithmics, where people actually use it.

*Edit before someone hits me with a 'academics also benchmark their algorithms', yes indeed. Big O is not the only thing you should use to describe an algorithm's performance. That doesn't mean it isn't useful.


I'd say it is overemphasized as a concept that will be useful. You spend a ton of time learning and talking about it, but I've never seen it outside of school except in interviews. We know that academics teach it and it is used in academia. The question I would pose is:
Is academia out of touch with industry and emphasizing a concept that most students will never use knowingly or unknowingly?


I think the notion that a university degree should prepare you for industry is out of touch. A bachelor + masters in computer science teaches you how to be an academic/scientist/researcher in the field of computer science. It does not teach you how to be a developer or work for a company, at least, that is not the main goal. There are other degrees or programmes that do that (at least in the Netherlands). I'm not sure how you were taught about Big O, maybe it was emphasized too much I don't know. However, Big O is a useful concept that is widely used in the field of computer science, particularly algorithmics, cryptography, distributed systems... at least, that's where I've seen it used personally. My experience with industry is very limited but I agree it is probably not a very useful concept for a developer most of the time. The ability to recognize it if you are trying to generally solve the traveling salesman problem for your business solution, and the knowledge that this is not practically doable for large enough problems, can come in very handy though.

On February 16 2019 00:43 JimmyJRaynor wrote:
Show nested quote +
On February 15 2019 16:56 solidbebe wrote:
I can imagine big O being of very limited use in industry as you will rarely be developing new algorithms for anything, rather than just using something established.

I`ve developed three customer handicapping algorithms. The algorithm assigns a value to each consumer in marketing lists that an org wishes to "rent" for 1 time usage. This helps the org decide whether or not to "rent" a marketing list. I've never used Big O. Big O is theoretical... for theorists. Its a layer of abstraction above a bunch of other layers of abstraction. I will say that Big O makes possible some entertaining mental gymnastics.
Show nested quote +
On February 15 2019 16:56 solidbebe wrote:rather than just using something established. So it's probably correct to state that nobody actually uses it... in industry. To state that big O is a ridiculous concept however is a ridiculous statement. It is quite an important concept within the field of algorithmics, where people actually use it.

how is it used within Algorithmics ?


I'm not really sure what your algorithm really does from your description, but yeah: it is perfectly possible to implement useful solutions without explicitly using the concept of Big O. Like I said, most of the time a developer probably doesn't need to even really consider the efficiency of their solution anyways.

I'm not sure what you mean by asking how it's used within algorithmics. If you've come up with a new algorithm and are publishing a paper about it, it is common to provide analysis of its runtime complexity through the Big O, Big Theta, Big Omega, benchmarks, and what have you. These are all properties of algorithms that are very useful to know about. Yes Big O is a theoretical concept, what's wrong with that?

To use a personal example: a while back I was parsing a dataset of about 300k records. For each unique IP address I needed to store relevant information, but multiple records could correspond to the same IP address. After implementing a dumb solution in 5 minutes, where I first made a pass to collect each unique IP, and then for each unique IP collects its corresponding information in another pass, it took more than a minute to run before I stopped it. I realized I had just implemented a solution of which the runtime scaled in the square of the input, when I could very simply just do it in a single pass and get a linear solution. I didn't explicitly think of the Big O notation, but I did basically use it.
That's the 2nd time in a week I've seen someone sig a quote from this GD and I have never witnessed a sig quote happen in my TL history ever before. -Najda
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
February 15 2019 17:21 GMT
#19919
I use big O for when I see someone implement something that should clearly be O(n) in O(n^2) without any better constant factors or anything. Which happens way too often. Just today I came across 2 more such cases...

I have seen a dictionary lookup implemented in O(n). Really. And that was basically just a wrapper for a proper .Net dictionary.
If you have a good reason to disagree with the above, please tell me. Thank you.
Blitzkrieg0
Profile Blog Joined August 2010
United States13132 Posts
Last Edited: 2019-02-15 17:59:23
February 15 2019 17:53 GMT
#19920
I more meant in the context of the question Travis posted, which has now been deleted so probably harder to discuss. Most of the BigX questions I did in school were based around calculating an exact value whereas in industry you only really care about the simplest questions, is this faster or does this scale if things get big?

It also neglects this business side of things where delivering something if often more important than it being efficient. Writing something inefficiently that runs in the background exactly once isn't going to matter and spending a week writing it efficiently isn't the best solution.
I'll always be your shadow and veil your eyes from states of ain soph aur.
Prev 1 994 995 996 997 998 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 10m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
PiGStarcraft379
ViBE90
CosmosSc2 47
StarCraft: Brood War
Artosis 618
Hyuk 147
League of Legends
JimRising 452
Counter-Strike
Fnx 1373
SPUNJ143
taco 27
Heroes of the Storm
Trikslyr87
Other Games
summit1g12344
Grubby2049
FrodaN1810
Day[9].tv822
shahzam534
C9.Mang0426
Organizations
Other Games
gamesdonequick849
BasetradeTV130
[ Show 11 non-featured ]
StarCraft 2
• Hupsaiya 60
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• Migwel
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Other Games
• imaqtpie895
• Day9tv822
Upcoming Events
PiGosaur Cup
10m
PiGStarcraft379
The PondCast
9h 10m
University League
9h 10m
LiuLi Cup
10h 10m
Rogue vs TBD
Maru vs TBD
OSC
15h 10m
Replay Cast
22h 10m
GSL
1d 10h
Maru vs Dark
Patches Events
1d 13h
OSC
1d 15h
Replay Cast
1d 22h
[ Show More ]
KCM Race Survival
2 days
Ultimate Battle
2 days
ZerO vs Bisu
RSL Revival
3 days
BSL
3 days
eOnzErG vs StRyKeR
Cross vs JDConan
RSL Revival
4 days
IPSL
4 days
Ret vs ggnore13
nOmaD vs Aether
BSL
4 days
Bonyth vs Doodle
Kyrie vs Jimin
Replay Cast
4 days
WardiTV Weekly
5 days
Kung Fu Cup
6 days
Solar vs Classic
ByuN vs SHIN
Liquipedia Results

Completed

Proleague 2026-11-16
Blizzard Classic Cup 2026
HCC Season 3

Ongoing

Acropolis #5
KCM Race Survival 2026 Season 4
International ShieldBattery League
BSL Season 23
IPSL Winter 2026-27
Calamity Cup Div. A Season 8
Underdog Cup 2026 Div 2-3
Stake Ranked Episode 6
BLAST Rivals Fall 2026
IEM Beijing 2026
PGL Masters Bucharest 2026
Stake Ranked Episode 5
1win Private Club #2
Thunderpick World Champ. '26
ESL Pro League Season 24
Stake Ranked Episode 4
1win Private Club #1
Logitech G Play Connect 2026
SL StarSeries Fall 2026
FISSURE Playground #3
BLAST Open Fall 2026

Upcoming

Sector 591
YSL S4
SC4ALL II: Brood War
NBSL 2026 Xiamen LAN
BSL 23: Non-Korean Championship
HSC XXX
Stellar Fest 2: Lunar Cup
StarCraft2 Weekly Open Tournament 2026 Grand Finals
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
RSL Offline Finals
IEM Kraków 2027
PGL Bucharest 2027
BLAST Bounty Winter 2027
PGL Major Singapore 2026
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.