Second largest number python problem Given an array of numbers, write python code to find second largest number in array Code to find second largest number in list A C++ version can also be found here. Thanks for visiting. Please use the comments section for feedback.
Introduction The purpose of this short post is to explain operating system’s page table vs inverted page table, mention their advantages and disadvantages in an easy to follow manner. Many students and beginners do not get the point behind these two concepts so my intention here is to clear any possible confusion rather than dive
Introduction I highly recommend that you check out the following article to get a quick idea about different terms used in operating systems with regard to concurrency, multitasking and threading. Back to our topic, In this short post, I am going to demonstrate the use of mutex in python. Let us get started. What on
Introduction The distinction between regular and static variables in C++ is a such a confusing topic for many beginners including students and programers. In this short article, I am going to provide an brief explanation and hopefully remove the ambiguity. I personally believe that the root cause of confusion is due to lack of context.
Problem Given the cache interface below We want to implement a generic cache class in order to improve compile time type checking. Solution Using Java Generics one can provide variable types as parameters for compile time type checking. In this case we are going to use K for key and V for value as follows
Problem Given the Java cache interface below, write a singleton class that implements the interface so that no warnings are generated without using @SuppressWarnings annotations Solution The question is mainly about two points: Type checking warning must be fixed Singleton design pattern should be implemented here is how I approached the problem… I modified the map private
Some time ago, I applied for a software QA position and was given this assignment: Problem Given 2 input files with rows in the format: Write a python script to print: All accounts in the first file not in the second All accounts in the second file not in first All accounts in both files
Question In Perl what is the difference between return and return undef Answer Using “return” alone returns an empty list in list context and undef in scalar context. On the other hand “return undef” always returns undef even in list context. Generally speaking it is not a good idea to return undef from a subroutine