Skip to content

Instantly share code, notes, and snippets.

View 09sanket's full-sized avatar
🎯
Focusing

Sanket Rahanghdale 09sanket

🎯
Focusing
  • Coding Ninjas
  • Home
View GitHub Profile
@09sanket
09sanket / sorted.java
Created December 31, 2022 17:51
coding ninjas Java Test 3 Set 2 (Sorted Linked List to Balanced BST)
// public class Solution
// {
// public static TreeNode<Integer> sortedListToBST(Node<Integer> head)
// {
// // Write your code here.
// }
// }
public class Solution
@09sanket
09sanket / convertbst.java
Created December 31, 2022 17:50
coding ninjas Java Test 3 Set 2
/************************************************************
Following is the TreeNode class structure
class TreeNode<T> {
T val;
TreeNode<T> left;
TreeNode<T> right;
public TreeNode(T val) {
@09sanket
09sanket / validstackpermutation.java
Created December 31, 2022 17:48
coding ninjas Java Test 3 Set 2
// public class Solution {
// public static boolean validStackPermutation(ArrayList<Integer> first, ArrayList<Integer> other){
// // Write your code here.
// }
// }
import java.util.ArrayList;
import java.util.Stack;
@09sanket
09sanket / win.java
Created December 31, 2022 17:47
coding ninjas Java Test 3 Set 2 Winner of the Circular Game
// import java.util.*;
// public class Solution
// {
// static public int findTheWinner(int n, int k) {
// // Write your code here
// }
// }
public class Solution {
static public int findTheWinner(int n, int k) {
@09sanket
09sanket / amazingstrings.java
Created December 31, 2022 17:43
coding ninjas skill(Test 1 Set 1)
// public class Solution {
// public static String amazingStrings(string first, string second,string third) {
// // Write your code here.
// }
// }
public class Solution {
public static String amazingStrings(String first, String second, String third) {
// Declaring the size of string 'C' which will be used a lot of time later in code.
@09sanket
09sanket / pyramidnumberprint.java
Created December 31, 2022 17:41
coding ninjas skill (Test 1 set 1)
//Pyramid Number Pattern
import java.util.*;
public class Solution {
public static void main(String[] args) {
// Write your code here
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
@09sanket
09sanket / resetmatrix.java
Created December 31, 2022 17:37
codning ninjas skill test (Test 1 Set 1)
// public class solution {
// public static void makeRowsCols0(int [][]input) {
// // Write your code here
// }
// }
import java.util.Scanner;
@09sanket
09sanket / binarysum.java
Created December 31, 2022 17:12
Coding ninjas Skill Tests in Java (Test 1 Set 1)
// public class Solution {
// public static void main(String[] args) {
// /* Your class should be named Solution.
// * Read input as specified in the question.
// * Print output as specified in the question.
// */
// // Write your code here