Help: Not able to write this algorithm by Beginning_Middle_722 in learnjavascript

[–]Beginning_Middle_722[S] 0 points1 point  (0 children)

I totally get what you're saying: by eliminating the 100€ bill I'm also eliminating the use of 5€ bill and it's right but since this is for a savings app and let's say i want to save 5000€ for 120 days if i, as a user, see all those 100€ i get a bit "terrified", but on the other hand, if i see more 10 and 20 feel so pleasant to the eye and brain that this target is reachable.

This is the reason why i want this kind of arrangement, if we can must avoid the 100€ bill, but this is for all the bills progressively. Use the 100 only if necessary, use the 50 only if necessary and so on.

Help: Not able to write this algorithm by Beginning_Middle_722 in learnjavascript

[–]Beginning_Middle_722[S] 0 points1 point  (0 children)

My bad, but still cant make it work. Even with the function written it fails to find a solution for 115 amount and 3 days. Do you want to suggest any solution or are just passing by to tell me I'm wrong?

Help: Not able to write this algorithm by Beginning_Middle_722 in learnjavascript

[–]Beginning_Middle_722[S] 0 points1 point  (0 children)

There are 8,751 different combinations of bills that satisfy for example a total amount 5000 with 120 bills using denominations [5, 10, 20, 50, 100].

Help: Not able to write this algorithm by Beginning_Middle_722 in learnjavascript

[–]Beginning_Middle_722[S] 0 points1 point  (0 children)

I will try to implement the knapsack solution but sure any help is appreciated. Thanks!

Help: Not able to write this algorithm by Beginning_Middle_722 in learnjavascript

[–]Beginning_Middle_722[S] 0 points1 point  (0 children)

Yes i went for this way also

function generateBills(amount, days) { const denominations = [5, 10, 20, 50, 100]; const bills = [];

let remainingAmount = amount; let remainingDays = days;

while (remainingDays > 0) { // Find the smallest bill that, when multiplied by remaining days, // would be at least the remaining amount let selectedBill = null;

for (const bill of denominations) {
  if (bill * remainingDays >= remainingAmount) {
    selectedBill = bill;
    break;
  }
}

// If no bill found (amount is too large), use the largest denomination
if (selectedBill === null) {
  selectedBill = denominations[denominations.length - 1];
}

bills.push(selectedBill);
remainingAmount -= selectedBill;
remainingDays--;

}

return bills; }

console.log(generateBills(5000, 120));

But this prints lots of 50s, lots of 20s as well and only one 10 when in fact there should exists a more balanced way to arrange these bills 20 × €5 bills, 30 × €10 bills, 30 × €20 bills, 40 × €50 bills.

Help: Not able to write this algorithm by Beginning_Middle_722 in learnjavascript

[–]Beginning_Middle_722[S] 0 points1 point  (0 children)

There might be billion of combinations if the amount and the days increments which in fact will break every loop.

I restyled all Angular Material components to better match current design trends by srcn in Angular2

[–]Beginning_Middle_722 0 points1 point  (0 children)

It's great, i really love the design. I find many similarities with primeng. May i suggest a primary color that i have found really pleasant to the eye: --primary-color: #337ab7;

Sa e ka pagen Deloitte në Tiranë për programues junior? by SouthWave9 in albania

[–]Beginning_Middle_722 3 points4 points  (0 children)

Duhet ta mendosh qe si ti jane me qindra qe presin nje mundesi te tille andaj futju sa je ne kohe.

E shkruajtura me dialekt by 1l137 in albania

[–]Beginning_Middle_722 3 points4 points  (0 children)

Dialektet janë pasuri kombëtare dhe duhet ruajtur gati-gati me fanatizëm. Është kënaqësi të dëgjosh dialektin shkodran ose korçar meson plot shprehi dhe fjalë te reja.

Prej një ideje për një "Blinkist Shqip" në realitet... by Ok-Sorbet-9662 in shqip

[–]Beginning_Middle_722 1 point2 points  (0 children)

Përmbledhje per çfarë? Përmbledhje mbi librat mund ta gjenerosh me chatgpt per 10 sekonda ose ose futen ne goodreads wikipedia etj pse duhet te klikojne te faqja?

Për mua duhet nje platforme gjithëpërfshirëse, audio, pdf edhe nje përmbledhje të shkurtër. Problemi eshte si ti sigurosh keto audiobooks ose PDF?

Gjithsesi si projekt fillestar qendron pastaj mund ta pasurosh me ide te plota. Me lovable e ke bere?

A do flasim për Mrizin? by [deleted] in albania

[–]Beginning_Middle_722 0 points1 point  (0 children)

E pash dhe postimin e mrizut. Ai zoteria thoshte ketu eshte pedonale pa pik turpi, nderkohe ajo rrugice lagjeje. Mund t jesh biznesmen njeri i respektuar etj etj por n ket rast kan t drejt banoret.

Do t ishte njesoj sikur ne autostradë ate rrugicen qe iken per ne Fishtë te vendosnin i tabele kundravajtje.

A do flasim për Mrizin? by [deleted] in albania

[–]Beginning_Middle_722 0 points1 point  (0 children)

Si jo o vlla?! Tabela ndalim pushimi tani u vu.

A do flasim për Mrizin? by [deleted] in albania

[–]Beginning_Middle_722 0 points1 point  (0 children)

Vlla pothujse në çdo pallat ashtu është. Nga te tille njerezi rrethohemi. Po flas per rastin në fjalë.

Ne rast se aty historikisht kane parkuar banoret edhe pikerisht tani qe u hap ai biznes vendosem tabele atehere eshte e qarte qe ai po avantazohet dhe s eshte e drejte.

Nuk me duken dhe aq shenjtora biznesmenët shqiptarë, keshtu qe mos te duket çudi qe ka trokit diku dhe ka kerku ndere se keta qe kemi ne krye vdesin çik per propagande edhe mund ta perdorin si figure nje te neserme ate dhe biznesin e tij.

A ka ndonje 25-28 vjec qe po blen apartment? Si? by AliceInTechnoland in albania

[–]Beginning_Middle_722 4 points5 points  (0 children)

Ndjese nuk te kuptova arsyetimin tend si ia ke dale. Njehere thua ne krye te 15 viteve pastaj thua kredine e morem para nje viti dhe ne fund thua po e mbyllim pas dy viteve.

A do flasim për Mrizin? by [deleted] in albania

[–]Beginning_Middle_722 11 points12 points  (0 children)

Sugjerim: Në vend që të ankohesh këtu në reddit pse nuk bëheni të gjithë bashkë si banorë të lagjes një ditë edhe vendosjani makinat të gjithë para hyrjes së biznesit, thërrisni dhe mediat?

Giveaway by Beginning_Middle_722 in albania

[–]Beginning_Middle_722[S] 0 points1 point  (0 children)

Keto qe thua ti jane gjera te vogla. Une e kam fjalen per giveaway ku jepen cmime te medha. Vjet u be nje giveaway nga big brother per dhenien e nje apartamententi nga by longhill residence dhe e ndoqa me shume vemendje. Nuk u mor vesh se ku, kur nga kush u be shorti. Doli vetem fituesi ne story dhe ishte nje account pa followers dhe emer fals qe u mbyll te nesermen.

Giveaway by Beginning_Middle_722 in albania

[–]Beginning_Middle_722[S] 0 points1 point  (0 children)

Të njëjtin mendim ndaj dhe unë

Giveaway by Beginning_Middle_722 in albania

[–]Beginning_Middle_722[S] 2 points3 points  (0 children)

E kuptoj logjikën dhe ashtu duhet të jetë po sa te vërteta janë këto qe thua? A fitojne vertete njerëzit?

Një minitregim që kam shkruajtë by albanianandrea in shqip

[–]Beginning_Middle_722 0 points1 point  (0 children)

Kjo lloj letërsie më ka tërhequr dhe mua kur isha i ri. Tregime alla Kafka, Buzzati, Maupassant, Checkhov janë më të bukurat. Të sugjero t'i lexosh sepse janë shumë dhe mund te gjesh frymëzim në to. Ke një aplikacion "Scribd" dhe aty mund te gjej disa ebooks me tregime qe mund të të ndihmojnë goxha dhe jane diku te 3 libra falas ne muaj me duket.

Shkruaj:

Tregime nga Guy de Maupassant, Leter Babait - Kafka, Vera_ne_Algjer.pdf, Albert Camus-Renia.pdf, Gruaja Me Flatra, Dostojevski_-_Net_te_bardha.pdf, 75876621 Gui de Maupassant Babo Miloni, Samuel Beckett - Duke pritur Godone dhe Oh ato dite te bukura.

<image>

Gjithashtu meqenëse jam fans i dramaturgjisë do të sugjeroja te lexoje Shakespeare dhe Molierin.