ᗷIᑎᔕ Gᖇᗩᗰ
Закритий канал
1 419
Підписники
-424 години
+437 днів
+13730 днів
Архів дописів
1 419
Coding depends on:
30% Google
20% Stack overflow
10% Own code
20% starring at the screen
20% starring at the ceiling
✗ @codinginsights ✗
1 419
❇️ Python"s built-in String Function
🌺 <str>.join(<string>)
(i) If the string based iterator is a string then the <str> is inserted after every character of the string .
Example:
>>>"+".join("BYE")
"B+Y+E"
(ii) If the string based iterator is a list or tuple of strings then,the given string/character is joined with each member of the list or tuple ,but the tuple or list must have all member as strings otherwisw python will raise an error.
Example:
>>>"@@".join["thief,stole"] 👉LIST
"thief@@stole"
>>>"###".join(("thief,gets,caught))👉TUPLE
"thief###gets###caught"
>>>"".join(("thief",123,"caught")
error** as the sequence must contain all strings
✗ @codinginsights ✗
1 419
Roadmap java backend developer
1. Core Java
Core Java is Java's building blocks and learning the core concepts are crucial to construct complex software applications.
a. Java basics
b. Oops Concept
c. Collections
d. Thread in Java
and more basic concepts.
2. Databases
Learning databases is essential, application saves computational data in DB, Learn databases and language to interact with databases.
a. SQL Server/MySQL
b. SQL Language
b. ORM/Hibernate/Mybatis
3. Advance Java
In addition to simple Java programming, Java is also used to construct dynamic websites. One should master advanced Java topics after learning core Java.
a. Servlets
b. JSP
4. Web servers
To deploy Java servlet applications and operate web apps, one needs to understand web servers.
a. Tomcat/Jetty (application server to run Java web app)
b. Apache HTTP Server (web server to host HTTP pages)
5. Frameworks
The next step is learning frameworks so you can create enterprise Java apps.
Understanding advanced Java features is a requirement before using frameworks because they are built on top of them.
a. Spring/Struts
6. Web services
Java applications mostly use APIs (Application Programming Interface) to solve complex problems. These APIs are hosted with the help of web services(REST/SOAP), Learning web services will help you build complex software server
✗ @codinginsights ✗
1 419
❇️ Interesting facts about Python Language
🍇 A man named Tim Peters composed a poem called ‘The Zen of Python' about Python programming.
🍋 Python is one of Google’s official programming languages.
🍓 Python has overtaken French in primary schools. In 2015. Statistics show that 60% parents would prefer their children to learn Python than French.
🫐 The language’s name isn’t about snakes, but about the popular British comedy troupe Monty Python
🍒 Python was a hobby project of the creator of Guido van Rossum. He was looking for an interesting project to keep him occupied during Christmas.
✗ @codinginsights ✗
1 419
What error occurs when you execute the following Python code snippet?
apple = mango
1 419
Tips for solving leetcode coding interview problems
If input array is sorted then
- Binary search
- Two pointers
If asked for all permutations/subsets then
- Backtracking
If given a tree then
- DFS
- BFS
If given a graph then
- DFS
- BFS
If given a linked list then
- Two pointers
If recursion is banned then
- Stack
If must solve in-place then
- Swap corresponding values
- Store one or more different values in the same pointer
If asked for maximum/minimum subarray/subset/options then
- Dynamic programming
If asked for top/least K items then
- Heap
If asked for common strings then
- Map
- Trie
Else
- Map/Set for O(1) time & O(n) space
- Sort input for O(nlogn) time and O(1) space
✗ @codinginsights ✗
1 419
❇️ Difference between Python and Java
🌺 Python
🔅 It has less lines of code .
🔅 It is slower since it uses interpreter
🔅 It is a dynamically typed language and doesn't require the developer to declare variables.
🔅 It is interpreted programming language, in which program can be run using a Python interpreter.
🌺 Java:
🔅It has longer lines of code.
🔅 Java is faster in speed
🔅 Java is a strongly typed language. it doesn’t allow the compiler to change the data type
🔅Java is a compiled language. The compiled code is converted to bytecode .
😎 Hope you guys liked it
✗ @codinginsights ✗
1 419
❇️ Program to calculate and print the sums of even and odd integers of first n natural numbers
1. n=int(input("upto to which natural number"))
2. c=1
3. s_even=s_odd=0
4. while c<=n:
5. if c%2==0:
s_even=s_even+ctr
6. else:
s_odd=s_odd+ctr
7. c=c+1
print(s_even)
print(s_odd)
Execution
1. 👉 you will enter upto which natural number you want sum
2. 👉 natural number starts with 1 not o
3. 👉 intially sum of even and odd number is 0
4. 👉 loop will continuously till c=n
5. 👉 if c is divisible by 2 then it is a even number
6. 👉 if not then it is a odd number
7. 👉 increment in c to bring second natural number e.g. intially c was 1 and now after adding 1 to c ,c=2 that is our second natural number and the cycle goes .
😎 Hope you guys liked it
✗ @codinginsights ✗
1 419
❇️ Types of Type Casting in Python –
🌺 Implicit Type Conversion
Python converts data type into another data type automatically. In this process, users don’t have to involve in this process.
Ex: a=4
b=5.0
c = a + b
print(c)
print(type(c))
Output: 9.0
<class "float">
🌺 Explicit Type Casting
Users convert the data type of an object to required data type. We use the predefined functions like int() , float() , str(). Python need user involvement.
Ex: a = "5"
n = float(a)
print(n)
Output: 5.0
🔅Difference : Explicit type conversion is done by the user whereas Implicit Type Conversion is done by a Python interpreter.
😎 Hope you guys liked it
✗ @codinginsights ✗
