Using While Loop

Program:public class Multiples{public static void main(String args[]) { int num=1; int meeting_point=0; int no1=21, no2=43; while(true) { if(num%no1==0 && num%no2==0) { meet...
0 Read More

38. Count and Say

38. Count and SayDifficulty: MediumTopics: StringThe count-and-say sequence is a sequence of digit strings defined by the recursive formula: countAndSay(1) = "1" countAndSay(n) is the run-length enco...
0 Read More

Understanding Leetcode #15 3Sum

Leetcode # 15. 3Sum provides an unsorted list of integers and asks that you find all unique triplets from that list that add to a target number, in this case zero (0). A brute force approach would be ...
0 Read More