Skip to content

HackerRank Hackfest 2020 solutions (archived contest): This article preserves four programming challenges from the 2020 event: Cyclic Binary String, Game of Maximization, Strictly Increasing Sequence, and RBG Queries. The event is historical, not an upcoming competition. Each section includes the problem idea and Java solution; review the original challenge for exact input/output requirements. Java note: The code snippets are method implementations for HackerRank-style Result classes, not standalone programs with a… Read More »HackerRank Hackfest-2020

HackerRank Hackfest-2020

  • by
Speed up Python by up to Million time

Can Numba or Cython speed up Python? Yes—especially CPU-bound numerical loops—but the gain depends on the workload, data types, compilation cost and baseline. Neither library guarantees a million-fold speedup. This guide explains when to choose each, how to run a reproducible comparison, and why an earlier microbenchmark on this page was misleading. Numba vs Cython: what each tool does Numba uses just-in-time compilation to optimize supported Python and NumPy numerical… Read More »Speed Up Python with Numba and Cython: Realistic Benchmarks

Speed Up Python with Numba and Cython: Realistic Benchmarks

Bubble sort repeatedly compares adjacent items and swaps them when out of order. It is useful for learning sorting, but Python’s built-in sorted() and list.sort() are preferable for production code. Bubble sort is an algorithm that compares the adjacent elements and swaps their positions if they are not in the intended order. It makes multiple passes through a list. Each pass through the list places the next largest value in… Read More »Bubble Sort in Python: Algorithm, Code and Complexity

Bubble Sort in Python: Algorithm, Code and Complexity

  • by

To insert a 4×4 matrix in Microsoft Word, the most reliable method is to use the built-in Equation gallery, choose a 3×3 matrix, then add one row and one column. On compatible desktop versions, UnicodeMath linear input can also create matrices quickly; it is not the same as typing a matrix into ordinary body text. Method 1: Build a 4×4 matrix with the Equation gallery Place the cursor where the… Read More »Insert a 4×4 Matrix in Word: Equation Editor and Linear Input

Insert a 4×4 Matrix in Word: Equation Editor and Linear Input

  • by