Monthly Archives: June 2017

Reverse an Integer

import java.util.ArrayList; import java.util.List; import org.testng.annotations.Test; /** * @author asharda * */ public class TestReverseInteger { @Test public void testReverseInteger() { System.out.println(“Reversed integer seen is “+reverseInt(23456)); }   public int reverseInt(int input) { long reversedNum = 0; long input_long = … Continue reading

Posted in Java, Uncategorized | Leave a comment

Median of Two Sorted Arrays -LeetCode

There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)   ”’ Created on Jun 23, 2017 @author: asharda ”’ import numpy as … Continue reading

Posted in LeetCode Solutions, Uncategorized | Leave a comment

Reverse an Integer -LeetCode

import java.util.ArrayList; import java.util.List; import org.testng.annotations.Test; /** * @author asharda * */ public class TestReverseInteger { @Test public void testReverseInteger() { int num=123; int div=num; int rem=0; List<Integer> list=new ArrayList<Integer>(); while(div>100) { div=num/10; rem=num%10; list.add(rem); } list.add(div%10); list.add(div/10); Integer [] … Continue reading

Posted in Java, LeetCode Solutions, Uncategorized | Leave a comment

Using Streams and Parallel Streams

  import java.util.ArrayList; import java.util.List; import java.util.stream.Stream; import org.testng.annotations.Test; /** * Test using Stream and Parallel Stream. * @author asharda * */ public class StreamTest { @Test public void testStreams() { List<Integer> list=new ArrayList<Integer>(); for(int i=0;i<100;i++) { list.add(i); } System.out.println(“Using … Continue reading

Posted in Java, Uncategorized | Leave a comment

Run ExtentX on different host

http://extentreports.com/docs/extentx/#same-host

Posted in Uncategorized | Leave a comment

35 new English words

http://mentalfloss.com/article/31363/35-modern-words-recently-added-dictionary

Posted in Uncategorized | Leave a comment

Schedule a job every 55 mins in TeamCity

Image | Posted on by | Leave a comment