Skip to content

Software Engineering Authority

  • Home
  • SaaS
    • Realtime Customer Analytics
    • HTTP Logger
  • Software
    • Serengeti – The Autonomous Distributed Database
    • Run JS – Chrome Extension
    • MakePip – Python Packager
    • Keep that mouse moving!
  • Github

Software Engineering Authority

  • Home
  • SaaS
    • Realtime Customer Analytics
    • HTTP Logger
  • Software
    • Serengeti – The Autonomous Distributed Database
    • Run JS – Chrome Extension
    • MakePip – Python Packager
    • Keep that mouse moving!
  • Github

How to Solve the “Decode a String” Challenge in Java

  • November 20, 2020November 20, 2020

The challenge Given an encoded string, return its decoded string. The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is being repeated exactly k times. Note that k is… Read More »How to Solve the “Decode a String” Challenge in Java

How to cleanup a /var/log/journal in Linux

  • November 19, 2020November 19, 2020

You may find your /var/log/journal directory taking up a lot of disk-space. How do you go about removing, or deleting all these files without the… Read More »How to cleanup a /var/log/journal in Linux

How to Find the Maximum Difference Between Node and Ancestor in Java

  • November 18, 2020November 18, 2020

The challenge Given the root of a binary tree, find the maximum value V for which there exist different nodes A and B where V = |A.val – B.val| and A is an ancestor of B. A node A is an ancestor… Read More »How to Find the Maximum Difference Between Node and Ancestor in Java

How to Find the Integral using Java

  • November 17, 2020November 17, 2020

The challenge Create a function that finds the integral of the expression passed. In order to find the integral all you need to do is add one… Read More »How to Find the Integral using Java

How to Build Strings from a Size in Java

  • November 16, 2020November 16, 2020

The challenge Write a function stringy that takes a size and returns a string of alternating ‘1s’ and ‘0s’. The string should start with a 1. A string with size 6 should return :’101010′. With size 4 should return… Read More »How to Build Strings from a Size in Java

Best Time to Buy and Sell Stock in Java

  • November 15, 2020November 15, 2020

The challenge Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to… Read More »Best Time to Buy and Sell Stock in Java

How to Solve the “To square(root) or not to square(root)” Challenge in Java

  • November 14, 2020November 14, 2020

The challenge Write a method, that will get an integer array as parameter and will process every number from this array.Return a new array with… Read More »How to Solve the “To square(root) or not to square(root)” Challenge in Java

Solving the Rule of Divisibility by 13 in Java

  • November 13, 2020November 13, 2020

The challenge “A divisibility rule is a shorthand way of determining whether a given integer is divisible by a fixed divisor without performing the division,… Read More »Solving the Rule of Divisibility by 13 in Java

How to Calculate Buddy Strings in Java

  • November 12, 2020November 12, 2020

The challenge Given two strings A and B of lowercase letters, return true if you can swap two letters in A so the result is equal to B, otherwise, return false. Swapping letters is defined… Read More »How to Calculate Buddy Strings in Java

How to Flip a Binary Matrix in Java

  • November 11, 2020November 11, 2020

The challenge Given a binary matrix A, we want to flip the image horizontally, then invert it, and return the resulting image. To flip an image… Read More »How to Flip a Binary Matrix in Java

How to Tilt a Binary Tree in Java

  • November 10, 2020November 10, 2020

The challenge Given the root of a binary tree, return the sum of every tree node’s tilt. The tilt of a tree node is the absolute difference between the sum of all left… Read More »How to Tilt a Binary Tree in Java

How to solve the House Robber Challenge in Java

  • November 9, 2020November 9, 2020

The challenge You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only… Read More »How to solve the House Robber Challenge in Java

How to Solve the Bag of Tokens Challenge in Java

  • November 8, 2020November 8, 2020

The challenge You have an initial power of P, an initial score of 0, and a bag of tokens where tokens[i] is the value of the ith token (0-indexed). Your goal is to maximize your total score by potentially… Read More »How to Solve the Bag of Tokens Challenge in Java

How to Find the Smallest Divisor Given a Threshold in Java

  • November 7, 2020November 7, 2020

The challenge Given an array of integers nums and an integer threshold, we will choose a positive integer divisor and divide all the array by it and sum the result… Read More »How to Find the Smallest Divisor Given a Threshold in Java

How to Sort and Star a String Array in Java

  • November 6, 2020November 6, 2020

The challenge You will be given a vector of strings. You must sort it alphabetically (case-sensitive, and based on the ASCII values of the chars)… Read More »How to Sort and Star a String Array in Java

How to Count Consecutive Characters in Java

  • November 5, 2020November 5, 2020

The challenge Given a string s, the power of the string is the maximum length of a non-empty substring that contains only one unique character. Return the power of… Read More »How to Count Consecutive Characters in Java

How to Abbreviate a Two Word Name in Java

  • November 4, 2020November 4, 2020

The challenge Write a function to convert a name into initials. This challenge strictly takes two words with one space in between them. The output… Read More »How to Abbreviate a Two Word Name in Java

How to Sort a Linked List using Insertion Sort in Java

  • November 3, 2020November 3, 2020

The challenge Sort a linked list using insertion sort. A graphical example of insertion sort. The partially sorted list (black) initially contains only the first… Read More »How to Sort a Linked List using Insertion Sort in Java

How to Remove First and Last Character in a String in Java

  • November 2, 2020November 2, 2020

The challenge The goal is to create a function that removes the first and last characters of a string. You don’t have to worry with… Read More »How to Remove First and Last Character in a String in Java

How to Distribute Halloween Candies by Rating Value in Java

  • November 1, 2020November 1, 2020

The challenge There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the… Read More »How to Distribute Halloween Candies by Rating Value in Java

How to Distribute Halloween Candies in Java

  • October 31, 2020October 31, 2020

The challenge You have n candies, the ith candy is of type candies[i]. You want to distribute the candies equally between a sister and a brother so that each of… Read More »How to Distribute Halloween Candies in Java

How to Solve the Maximize Distance to Closest Person Challenge in Java

  • October 30, 2020October 30, 2020

The challenge You are given an array representing a row of seats where seats[i] = 1 represents a person sitting in the ith seat, and seats[i] = 0 represents that the ith seat is empty (0-indexed).… Read More »How to Solve the Maximize Distance to Closest Person Challenge in Java

How to Get Character from ASCII Value in Java

  • October 29, 2020October 29, 2020

The challenge Write a function which takes a number and returns the corresponding ASCII char for that value. Example: For ASCII table, you can refer… Read More »How to Get Character from ASCII Value in Java

Finding a Needle in a Haystack in Java

  • October 28, 2020October 28, 2020

The challenge Can you find the needle in the haystack? Write a function findNeedle() that takes an array full of junk but containing one “needle” After your function finds the… Read More »Finding a Needle in a Haystack in Java

How to Solve the Champagne Tower in Java

  • October 27, 2020October 27, 2020
  • 1 Comment

The challenge We stack glasses in a pyramid, where the first row has 1 glass, the second row has 2 glasses, and so on until the 100th row.  Each glass holds one cup (250ml)… Read More »How to Solve the Champagne Tower in Java

  • « Previous
  • 1
  • …
  • 3
  • 4
  • 5
  • 6
  • 7
  • …
  • 28
  • Next »
en English
ar العربيةzh-CN 简体中文nl Nederlandsen Englishfr Françaisde Deutschit Italianopt Portuguêsru Русскийes Español

FREE Weekly Digest

Subscribe to receive an email every week for FREE

Name

Email


  • Actionscript
  • Advertising
  • Agile
  • AI
  • Android
  • Angular
  • AWS
  • Big Data
  • Biometrics
  • CLI
  • Cloud
  • CSS
  • Databases
  • Distributed
  • Docker
  • Domains
  • Forensics
  • Git
  • Go
  • Hosting
  • IDE
  • Interview
  • Java
  • Javascript
  • Kubernetes
  • Linux
  • Mac
  • Maven
  • Misc
  • MySQL
  • Networking
  • Node
  • NPM
  • Pandas
  • PHP
  • PIP
  • Platform
  • Python
  • Ruby
  • Security
  • SEO
  • Software
  • SQL
  • SSH
  • SSL
  • Startup
  • Terraform
  • Typescript

Be Social!

  • Facebook
  • Twitter
  • GitHub

Join over 12,000 other subscribers!

Subscribe to receive an email every week for FREE and boost your Software Engineering midset

Name

Email


Recent Posts

  • Block sequence in Java
  • Roman Numerals Helper in Java
  • Closest pair of points in linearithmic time in Java
  • Find sum of top-left to bottom-right diagonals in Java
  • Sweeping trees in Java
  • Detect Pangram in Java
  • Remove the parentheses in Java
  • What century is it in Java
  • Lost number in number sequence in Java

All content copyright to Andrew O - © 2021

Follow on Facebook