โCHOCXโ is a bakery specialized in chocolate cakes. Their cake formula is - each cake contains 40% Bread, 10% Sugar, 30% Cream, 20% chocolate. They accept order via mail for X kg cake. In response, they confirm if they can deliver the cake with a โThank youโ or if they canโt with a โSorryโ note. When they respond they make sure, if any component is greater and equal to the required component, they retain 1 kg of each component Bread, Sugar, Cream, Chocolate in their inventory.
Category: Coding Ground
Here i Write Code, About everything from the problem my Professors Gave to the Problems i come across, or when i code just for fun
[Programmers.IO] minimum Assistance Problem
A finance company wants to hire some support assistance based upon their cases arrival and solved time but the company is confused with what is the minimum number of assistance required to handle the cases. Help the company to calculate minimum number to assistance can handle the cases. WAP to take input of 2 array/list (One for Case Arrival Time another of Case Solved Time), and your program should return the minimum number of assistance required for the company. Note: Assign assistance in such a way that no cases needed to be wait to arrive.
Real-world application of dynamic programming in image resizing[Seam Carving]
Seam Carving is a content Aware resizing algorithm developed by Shai Avidan, of Mitsubishi Electric Research Laboratories (MERL), and Ariel Shamir...
[Program][Kotlin] Count words from a file
import java.io.File fun main(args: Array<String>){ val file = File("src\\text.txt") val count = file.readText().split(" ").size println(count) }
[Program][Kotlin] Count Numbers in a File
import java.io.File fun main(args: Array<String>) { val file = File("src\\words_with_numbers.txt") val count: Int = file.readLines().count { try { Integer.parseInt(it) return@count true } catch (e: NumberFormatException) { return@count false } } println(count) }
[Program][Kotlin]Rotate Array by N
import java.util.* fun main(args: Array<String>) { val scanner = Scanner(System.`in`) val a = IntArray(scanner.nextInt()) { scanner.nextInt() } var r = scanner.nextInt() if (r > a.size) r = r % a.size if (r != a.size) { repeat(r) { val last = a.last() var prev = a[0] var temp: Int for (i in 1..a.lastIndex) { temp = … Continue reading [Program][Kotlin]Rotate Array by N
[Pattern][Java]
a pattern program in java Pa Pat Patt Patte Patter Pattern attern ttern tern ern rn n
[C++]Eucliden GCD Finding
#include <iostream> using namespace std; int GCD(int a,int b){ if(a==0) return b; else if(b==0) return a; return GCD(b,a%b); } int main() { cout<<GCD(270,192); return 0; }
[How-To][C#]Dynamically adding MenuItem and using Binding with viewModel
WPF's databinding is a powerful feature and I love how easy it becomes once you start to learn. so in my journey of MVVM, I had the requirement to use a WPF Menu Control, where I created Menu in XAML and then binded their commands via ViewModel, but I was Curious as if there was … Continue reading [How-To][C#]Dynamically adding MenuItem and using Binding with viewModel
[How-To][VB.NET] Setting custom icon for a folder and refresh it instantly
Shows how to implement PInvoke methods in .Net to instantly set and refresh custom folder icon

