1 / 5

Doc DSA Roadmap_Day4

ud83dude80 ud83cudf1f Day 4 of DSA Mastery ! Enhance your coding expertise guided by HeyCoach's industry experts.

HeyCoach
Download Presentation

Doc DSA Roadmap_Day4

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 30 DAYS DSA ROADMAP Swipe for more >

  2. DAY 4 Maths Power of Two Difficulty – Easy Given an integer n, return true if it is a power of two. Otherwise, return false. An integer n is a power of two, if there exists an integer x such that n == 2^x. Example 1: Input: n = 1 Output: true Explanation: 2^0 = 1 Example 2: Input: n = 16 Output: true Explanation: 2^4 = 16 Example 3: Input: n = 3 Output: false

  3. Divide Two Integers Difficulty – Medium Given two integers dividend and divisor, divide two integers without using multiplication, division, and mod operator. The integer division should truncate toward The integer division should truncate toward zero, which means losing its fractional part. Example: Input: dividend = 10, divisor = 3 Output: 3 Explanation: 10/3 = 3.33333.. which is truncated to 3. Problem link

  4. Pow(x,n) Difficulty – Medium Implement pow(x, n), which calculates x raised to the power n (i.e., x^n). Example 1: Input: x = 2.10000, n = 3 Output: 9.26100 Example 2: Input: x = 2.00000, n = -2 Output: 0.25000 Explanation: 2^(-2) = 1/2^2 = 1/4 = 0.25 Problem link

  5. Permutation Sequence Difficulty - Hard The set [1, 2, 3, ..., n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order, we get the following sequence for n = 3: "123" "123" "132" "213" "231" "312" "321" Example 1: Input: n = 3, k = 3 Output: "213" Example 2: Input: n = 4, k = 9 Output: "2314" Problem link

More Related