Coding
PHP role in Web Development
So I would like to enhance my ability in web technologies from html/css to javascript and php. I have two questrions: What is the role of PHP in a website? Is it just used to Read more…
So I would like to enhance my ability in web technologies from html/css to javascript and php. I have two questrions: What is the role of PHP in a website? Is it just used to Read more…
I’m definitely not the first person to think of this, but I like it in a cheating kind of way. Is the typeof(subtract) == typeof(const_true) comparison optimized away by the compiler? If not, I can Read more…
Given a list containing future price predictions of two different stocks for the next n-days, find the maximum profit that can be earned by selling the stocks with a constraint that the second stock can Read more…
Given a sorted integer array, find the k closest elements to x in the array where k and x are given positive integers. The integer x may or may not be present in the input Read more…
So I cast the int number 250 to a char, and initially was confused why the corresponding ASCII didn’t appear when I did printed it, but then realised it seemed to be using UTF instead? Read more…
Suppose you are given n red and n blue water jugs, all of different shapes and sizes. All red jugs hold different amounts of water, as do the blue ones. Moreover, there is a blue Read more…
Given an m-ary tree, write an efficient algorithm to convert the tree to its mirror. An m-ary tree (aka k-ary tree) is a tree in which each node has no more than m children. Each Read more…
Hi. I wonder if the .NET platform is such a jack of trades, master of none. The backend is ruled by Java, on the Javascript front, in mobile Kotlin, in games and low-level things C++ Read more…
Given an array of integers, trim it such that its maximum element becomes less than twice the minimum, return the minimum number of removals required for the conversion. For example, The idea is straightforward and Read more…
Hi, I have inherited 0.5 mio C# LOC across 180 projects written by complete lunatics. Everything is public, ReSharper has more warnings than LOC and even the unit test project itself has less than 10% Read more…