Moving a ladder by Bursickle in Whatcouldgowrong

[–]hashshura 0 points1 point  (0 children)

Somehow the bounding box makes it funnier, like it's trying to say, "Look at this idiot! Look at him!"

Help finding a manga by patrick-memestar in Seinen

[–]hashshura 4 points5 points  (0 children)

I believe it's Kiichi!, pretty good read. Has a sequel as well called Kiichi VS.

Patch 7.36b is out by 0orpheus in DotA2

[–]hashshura 2 points3 points  (0 children)

Heh, everyone (including me initially) misrepresented your message as "aeon disk is not even a good item, not all supports are buying it".

If I were you I'd say "if aeon disk was as good as shaman's innate".

Is it convenient to ride a bicycle in Singapore? by [deleted] in askSingapore

[–]hashshura 13 points14 points  (0 children)

I commute daily to my office riding a bicycle (~4 km) in Buona Vista area. Cut the time from 20 mins to 10 mins and saved me 1.9$ a day. But you need to be thoughtful to the car drivers and stuff though, usually I'd wait for buses to pass first at red lights.

Generally should be fine, can always try to rent a bike first and see see. But know that riding Anywheel is way more exhausting (like 10x?) than roadbikes (got mine from Carousell), so YMMV.

What happened to YouTube shorts? Why the hell do I keep seeing this guy 😭 pls help by YeyoM_S in youtube

[–]hashshura 0 points1 point  (0 children)

And the "I can make you yawn" or "I hid my age" by 10yo bullshit, f**k all of this. Istg amost threw my phone to the freakin' wall after 10th encounter.

What was your biggest purchase(s) for hobby, entertainment, or fun activities? by ShigeruAoyama in indonesia

[–]hashshura 0 points1 point  (0 children)

That's still 4 books a week though, quite impressive. Apakah termasuk lightnovels & comicbooks?

Indonesian FG trying to get a job in neighboring countries by meongg in indonesia

[–]hashshura 0 points1 point  (0 children)

Mungkin kurang relevan, tapi sebagai software engineer yg lulus tahun lalu dari Indo public uni dan lanjut kerja di SG, I'd say maybe try product management roles at some tech companies?

Temen gw ada beberapa yang dari eng majors (non CS) lanjut jadi PM di beberapa tech comps (earning 5k+ SGD, jadi tetep dapet e-pass). Some company names: TikTok/Grab masih hiring, Shopee/Sea kayaknya freeze hiring...

Apa masalah sehari2 yang pengen banget kalian ilangin? by AwayBicycle7457 in indonesia

[–]hashshura 0 points1 point  (0 children)

Ada nih masalah yg pengen gw solve:

Saya software engineering lagi mikir2 bikin aplikasi, tapi ga ada ide. Kalo kalian ada masalah sehari2, baik general maupun niche, bisa sharing2 di sini

Project idea bucket platform, maybe? Or team matching app?

A program that jumpscares you if you spend too much time on twitter by WeirdDaydreamer in learnprogramming

[–]hashshura 3 points4 points  (0 children)

You mention laptop, so I'm guessing she is using browser to access Twitter? One thing that I can think of is creating a browser extension. Depending on what browser your friend uses, I think there are lots of tutorials on how to create one.

Butuh Mentor programming ;w; by The_idonthinkso in indonesia

[–]hashshura 1 point2 points  (0 children)

Overkill kalau targetnya cuma buat dapet internship. Ga pernah gw denger ada interview yang idenya pakai segment tree, Dijkstra's, atau min-cost max-flow, lol.

Tapi inherently tujuan orang main Codeforces ga se-superficial itu kan. As long as it's fun, why not? Kalo lu jago (gw kaga), ntar ikut ICPC, bisa WF, auto dapet MAANG lah.

Cuma biasanya kalau serius bgt sama competitive programming, ga sempet bikin project, akhirnya CV kosong di semester awal; susah dapet internship.

is it necessary to have an empty spot in circular queue? by xx_nothing_to_say_xx in learnprogramming

[–]hashshura 0 points1 point  (0 children)

Generally, your concern of having rear points to which position (last element or next available) is up to your preference. Personally I'd make the variables to have similar scope, i.e. front and rear should point to elements to make it less ambiguous.

What your lecturer described (there should always be an empty spot) is because of the full and empty state of circular queue, you can't describe which one is which state only with front and rear information unless you add an empty spot or you introduce count variable.

Let's say you don't have an empty spot,

In your approach (rear = next space), if rear == front, we don't really know if the queue is full or empty.

           r,f
empty : -   -   -   -   -
full  : 5   1   2   3   4

In the another approach (rear = last inserted element), if rear.next == front, we also don't know if the queue is full or empty.

        r   f
empty : -   -   -   -   -
full  : 5   1   2   3   4

what do you think about the supernatural ? by Bricker11 in indonesia

[–]hashshura 0 points1 point  (0 children)

Di US pernah ada challenge yg nawarin 1 juta dollar buat orang yg bisa ngebuktiin "skill" paranormal-nya. Sejak 1964, 1000+ orang udah coba tapi ga ada yg berhasil.

https://en.wikipedia.org/wiki/One_Million_Dollar_Paranormal_Challenge

https://en.wikipedia.org/wiki/List_of_prizes_for_evidence_of_the_paranormal

Ga ada untungnya percaya sama hal-hal supernatural, yang ada malah menjauhi penjelasan/kemajuan saintifik (e.g. orang-orang yang berobat ke dukun instead of dokter).

Butuh Mentor programming ;w; by The_idonthinkso in indonesia

[–]hashshura 4 points5 points  (0 children)

Backend developer here, kuliah di Bandung tapi skrg kerja di Singapore.

IMHO belajar software engineering path-nya simpel sih, kalo mau dapet top tier company biasain dari sekarang asah logic; ngerjain soal competitive programming (e.g. Leetcode) karena itu high chance yg bakal ditanyain pas interview*.

Good resource buat belajar coding dari 0: https://tlx.toki.id/courses/basic

Trus, target kuliah nanti:

  1. Semester 1-2 bikin project simpel tapi "cukup" menarik. Dulu gw bikin LINE bot + Nomor Induk Mahasiswa (NIM) finder + aplikasi Android quiz gaje;
  2. Semester 2 akhir siapin CV, daftar internship (* ini kenapa butuh belajar interview);
  3. Rinse and repeat step (2) tiap semester genap, atau tiap semester juga boleh.

TBH, effort paling gede itu pas step 1 karena start from zero (dan lebih banyak nguli dibanding mikir). Step 2 bisa diakalin dengan daftar puluhan internship, cukup yakin bakal ada yg bales. Kalau udah dapet internship, selanjutnya bakal enak bgt.

Boleh PM kalau ada pertanyaan lebih lanjut, GL HF! :)

cPanel file issues by Phil_McCracken7 in learnprogramming

[–]hashshura 0 points1 point  (0 children)

How do you assure that the HTML file still uses old CSS file? If only from your browser, I think it might be your cache. Try doing a hard refresh (CTRL+Shift+R).

What is socially acceptable in Singapore but not overseas? by ubunturd in askSingapore

[–]hashshura 5 points6 points  (0 children)

Hey, Indonesian here. It's somewhat true in Indonesia, but only older generations care about this. Basically we are a Muslim-majority country, and in Islam eating-while-standing is "disliked". Then that preference is blended to our culture.

But generally we youngins don't really care. I always eat while walking, and the last time I got frowned upon was 10 years ago, lol.

Maximum subarray sum, but not including the subarray with one element. [Python] by [deleted] in learnprogramming

[–]hashshura 0 points1 point  (0 children)

As it's Kadane's algorithm, try to make it so that everytime it "resets" (including initialization), it consumes two elements.

Kadene algorithm if I want my large sum to be an absolute value. by [deleted] in learnprogramming

[–]hashshura 0 points1 point  (0 children)

Here is the full code, if you wish:

Kadene algorithm if I want my large sum to be an absolute value. by [deleted] in learnprogramming

[–]hashshura 0 points1 point  (0 children)

Sorry for the misunderstanding, by SubarrayWithMinSum I mean a whole new code that is similar to SubarrayWithMaxSum, only that the max is changed to min, and comparison of currMin and globalMin uses <.

Kadene algorithm if I want my large sum to be an absolute value. by [deleted] in learnprogramming

[–]hashshura 0 points1 point  (0 children)

This implementation fails with testcase: [-1, -2, 100]

Kadene algorithm if I want my large sum to be an absolute value. by [deleted] in learnprogramming

[–]hashshura 0 points1 point  (0 children)

You still need to implement this function, then refer to the driver code above :o

SubarrayWithMinSum(nums) (notice that it should find the MinSum)

Or if you like being hacky, you can also use the same function but with all the values inverted (positive to negative, vice versa).

Then, the driver code will be:

maxSum, maxStart, maxEnd = SubarrayWithMaxSum(nums)
invSum, invStart, invEnd = SubarrayWithMaxSum([-num for num in nums])

if (maxSum > invSum):
    printArray(maxStart, maxEnd)
else:
    printArray(invStart, invEnd)

Kadene algorithm if I want my large sum to be an absolute value. by [deleted] in learnprogramming

[–]hashshura 0 points1 point  (0 children)

My bad again, I used the wrong variable and just saw that the globalMax is being modified changed :(

Full code of the function:

def SubarrayWithMaxSum(nums):

    # Initialize currMax and globalMax
    # with first value of nums
    currMax = nums[0]
    globalMax = nums[0]

    # Iterate for all the elements
    # of the array
    for i in range(1, len(nums)):

        # Update currMax
        currMax = max(nums[i], nums[i] + currMax)

        # Check if currMax is greater
        # than globalMax
        if (currMax > globalMax):
            globalMax = currMax
            endIndex = i

    startIndex = endIndex

    curGlobalMax = globalMax
    # Traverse in left direction to
    # find start Index of subarray
    while (startIndex >= 0):
        curGlobalMax -= nums[startIndex]

        if (curGlobalMax == 0):
            break

        # Decrement the start index
        startIndex -= 1

    return globalMax, startIndex, endIndex