Skip to content

Instantly share code, notes, and snippets.

View pethaniakshay's full-sized avatar
🎯
Focusing

Akshay Pethani pethaniakshay

🎯
Focusing
View GitHub Profile
@pethaniakshay
pethaniakshay / FolderShortcutHealer.bat
Created December 7, 2016 18:15
Batch file to remove shortcut virus from removable disks.
@echo off
color 02
echo.
echo ==========================
echo Folder Shortcut Healer
echo ==========================
echo.
echo.
echo CREATED BY AKSHAY PETHANI
echo.
@pethaniakshay
pethaniakshay / SpiralOrderMatrix.java
Created December 7, 2016 17:23
Given a matrix of m * n elements (m rows, n columns), return all elements of the matrix in spiral order. Example: Given the following matrix: [ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ] ] You should return [1, 2, 3, 6, 9, 8, 7, 4, 5]
package interviewbitProgramming;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
/**
* Created by Akshay Pethani on 2016-12-06.
*
* Detailed Problem can be found on following link:
@pethaniakshay
pethaniakshay / ArrayListMatrix.java
Last active May 20, 2017 09:25
matrix using java 2-D ArrayList collection class
import java.util.*;
public class ArrayListMatrix {
public static void main(String args[]){
List<ArrayList<Integer>> a = new ArrayList<>();
ArrayList<Integer> a1 = new ArrayList<Integer>();
ArrayList<Integer> a2 = new ArrayList<Integer>();
@pethaniakshay
pethaniakshay / ExecuteDOSCommand.java
Created October 29, 2016 06:34
Run DOS Commands Using the Java Program
import java.io.IOException;
import java.io.InputStream;
public class ExecuteDOSCommand {
public static void main(String[] args) {
final String dosCommand = "ipconfig";
try {
final Process process = Runtime.getRuntime().exec(dosCommand );
final InputStream in = process.getInputStream();
int ch;