Open in app

Sign In

Write

Sign In

Big_Dream_Coder
Big_Dream_Coder

6 Followers

Home

About

Jun 24, 2022

Matrix Spiral Copy(Java Solution)

A Question on Pramp platform There are two ways of solving this question. One is iterative way, the other is recursive way. When I doing mocking interview on Pramp, the first solution that I come up with is to solve it in iterative way like the code below. static int[]…

Java

2 min read

Java

2 min read


Jun 15, 2022

Move Zeros To End(Java Solution)

a question on Pramp platform In the beginning, the solution that I come up with is below. Using two pointers to find the non-zero element and set it at where the slow pointer points at, and then iterate the whole array. The slow pointer will return the last place that…

Java

1 min read

Java

1 min read


Jun 13, 2022

Number of Paths(Java Solution)

A Question on Pramp platform There are three ways that you can solve it. Memoization + recursive function static int[][] memo; static int numOfPathsToDest(int n) { // your code goes here memo = new int[n][n]; for(int i = 0; i < n; i++){ Arrays.fill(memo[i], …

Java

2 min read

Java

2 min read


Jun 4, 2022

Sudoku Solver (Java Solution)

a Question on Pramp platform In this question, we are going to write a function called sudokuSolve, which is going to return whether the sudoku board is solvable or not. If it is solvable, the function should return true. Otherwise, return false. class Solution { static boolean sudokuSolve(char[][]…

Java

2 min read

Java

2 min read


Jun 3, 2022

Root of Number (Java solution)

a Question on Pramp platform In this question, we will need to re-implement a function to calculate the n’th root of number. The input of the function is a nonnegative number x and a positive integer n. In the end, the function should return the positive n’th root of x…

Java

2 min read

Java

2 min read


Sep 4, 2021

Java is Everywhere

Study Java for a better life and future… 1. Polymorphism Java is an object-oriented language, and polymorphism is one of its features. There are two types of polymorphism in Java. One is compile-time polymorphism and the other is runtime polymorphism. (1.1) Compile-time Polymorphism Compile-time polymorphism can be achieved with method overloading and operator overloading. …

Java

1 min read

Java

1 min read

Big_Dream_Coder

Big_Dream_Coder

6 Followers

“If you can dream it, you can do it.”

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech